Page 1 of 1

[Solved] Modular service for IRC channels

Posted: Mon Jun 14, 2004 5:41 pm
by Samurai
I have a bot that was built on the wollabot found here:
http://wollabot.sourceforge.net/
My question seem simple, but I cannot find an answer anywhere. The bot is connected to Gamesurge, an IRC server, which requires authenticating to an account for certain privileges. Here are my IRC preferences in my bot.ini:
[main]
; IRC preferences
server = "irc.gamesurge.net"
port = "6667"
nickname = "thebot'snick"
username = "thebot'susername"

The command to auth from an IRC client is:
/authserv auth username password

Does anybody know how I can get the bot to auth to the acount? I've tried many different things.

Posted: Mon Jun 14, 2004 5:57 pm
by feyd
using sockets, like the rest of the IRC stuff seems to use.. I imagine..

Posted: Mon Jun 14, 2004 6:16 pm
by kettle_drum
Yep and then issue the command according to the ircd protocol - PRIVMSG authserver :auth username password - or something similar.

Posted: Mon Jun 14, 2004 6:23 pm
by Samurai
Any suggestions?

Posted: Mon Jun 14, 2004 6:59 pm
by kettle_drum
Look at my bot class in the code snippet section of the forums.

Posted: Tue Jun 15, 2004 11:18 am
by Samurai
Ok, I actaully got it to auth to the account. Now the question I have is, can I delay the rest of the code while authserv actaully recognizes the account? I thought it would be
$delay(5);
but that doesn't work. Any suggestions?

Posted: Tue Jun 15, 2004 11:46 am
by kettle_drum
sleep(5);

Posted: Tue Jun 15, 2004 1:04 pm
by Samurai
Yeah, I did that, and also did it up to 30 seconds, but it stil joins the channel before authserv auths the account. In a normal IRC client 5 seconds is plenty.

Solved

Posted: Tue Jun 15, 2004 9:16 pm
by Samurai
$this->send('PRIVMSG authserv@services.gamesurge.net :AUTH username password');
$this->send('MODE nickname +x');

I didn't need a delay in the nd, I just had the snytax wrong on the second line.