[Solved] Modular service for IRC channels

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Samurai
Forum Newbie
Posts: 6
Joined: Mon Jun 14, 2004 5:41 pm

[Solved] Modular service for IRC channels

Post 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.
Last edited by Samurai on Tue Jun 15, 2004 9:17 pm, edited 1 time in total.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

using sockets, like the rest of the IRC stuff seems to use.. I imagine..
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

Yep and then issue the command according to the ircd protocol - PRIVMSG authserver :auth username password - or something similar.
Samurai
Forum Newbie
Posts: 6
Joined: Mon Jun 14, 2004 5:41 pm

Post by Samurai »

Any suggestions?
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

Look at my bot class in the code snippet section of the forums.
Samurai
Forum Newbie
Posts: 6
Joined: Mon Jun 14, 2004 5:41 pm

Post 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?
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

sleep(5);
Samurai
Forum Newbie
Posts: 6
Joined: Mon Jun 14, 2004 5:41 pm

Post 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.
Samurai
Forum Newbie
Posts: 6
Joined: Mon Jun 14, 2004 5:41 pm

Solved

Post 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.
Post Reply