IRC Getting the Bots to join a channel with a key (+k)
#1

Hi, i was searching all over this forum and another forum, and on different search engines.

I couldnt fine anything that would allow me to have an IRC Bot join my key protected (+k) channel to echo ingame messages.

I tried doing this...

pawn Код:
native ircJoinKeyChan(conn, channel[], key[]);
But it wouldnt work, it actually crashed my gamemode when trying to run it.

Then, when the bot connected i tried making it do ircSay("/join #channel key");

That didnt work either..

Then i had an idea

I defined the channel as #define ECHO_CHAN "#channel key"

Then for the connection i did

ircJoinChan(EchoConnection[0], ECHO_CHAN);

And it worked... The bot joined a key protected channel.

The only problem was it kept saying the key before every message.

<echoBot>: key [8]PlayerName: blah blah

It kept appearing like that.

So i defined the channel twice.

pawn Код:
#define ECHO_CHAN "#channel" // this is where msgs echo
#define ECHO_CHAN_KEY "#channel key"

//Then when it comes to joining the channel
ircJoinChan(EchoConnection[0], ECHO_CHAN_KEY);
and for echo messages send them to ECHO_CHAN

Worked perfect for me.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)