IRC Getting the Bots to join a channel with a key (+k) -
Outbreak - 14.07.2009
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.
Re: IRC Getting the Bots to join a channel with a key (+k) -
Vince - 14.07.2009
I think you better use
ircSendRawData.
Re: IRC Getting the Bots to join a channel with a key (+k) -
Marcel - 14.07.2009
ircSendRawData also isn't working. I was looking for a solution for this a long time ago but couldn't find it. This is quite usefull for people who want bots in their channels with a key on it, although I don't exactly know what is should be for? I think you're not giving the channel key to all players in your server?
Re: IRC Getting the Bots to join a channel with a key (+k) -
c0der. - 14.07.2009
ircSay does this:
PRIVMSG #CHANNEL :MESSAGE
If you make that to join you somewhere then it would be
PRIVMSG #CHANNEL :/join #CHANNEL PASSWORD
IRC raw isn't like the softened stuff you got in mIRC.
JOIN #channel password: ircSendRawData(conn, "JOIN #channel key");
Quote:
Originally Posted by Marcel
ircSendRawData also isn't working. I was looking for a solution for this a long time ago but couldn't find it. This is quite usefull for people who want bots in their channels with a key on it, although I don't exactly know what is should be for? I think you're not giving the channel key to all players in your server?
|
Works insanely well for me.
Re: IRC Getting the Bots to join a channel with a key (+k) -
Outbreak - 14.07.2009
I tried those other things. None worked.
All im doing is posting here what actually worked for me.
Since i searched around and couldn't find anything explaining how to do it. I thought i'd post how i got it working for me.
Re: IRC Getting the Bots to join a channel with a key (+k) -
Outbreak - 14.07.2009
Only problem i've found is its crash prone in Linux servers, but perfect in wondows..
not sure why though..
Re: IRC Getting the Bots to join a channel with a key (+k) -
Outbreak - 16.07.2009
Both the method posted by me and the one posted by c0der work perfectly fine, only on a windows server.
I added this same method to my Linux server and it kept crashing making the server constantly restart. The bot was joining the +k channel but kept quitting due to excess flood or time exdeed I think.