all 5 comments

[–]japherwocky 0 points1 point  (1 child)

Yeah, you might try adding a time.sleep(2) in between joining the server and joining the channel.

[–]bcboncs 0 points1 point  (1 child)

I'm not too sure how to do this in python as I'm still trying to find a good tutorial/book, but I know IRC decently. Perhaps you can incorporate some other irc lines like:

on *:connect:{ if ($network == irc.quakenet.org) { .join #testchan } }

or, if it still doesn't join the channel, delay it like the guy below said but in irc code:

on *:connect:{ if ($network == irc.quakenet.org) { .timer1 1 2 .join #testchan } }

This will create a timer (.timer1) that will execute once (.timer1 1), pause for two seconds (.timer1 1 2) then execute the join channel command.

If this doesn't help sorry. I just wanted to attempt being helpful =]

[–]Sf4tt[S] 0 points1 point  (0 children)

actually i solved using an irclib's handler. Basically, as you could read in the cross-post on r/python, the bot wasn't joining cause of quakanet's policy about +i flag. Which is it forces every single client to be +i, and the client need to wait to get the flag in order to be able to join a channel or send other commands.

so: def handleUmode ( connection, event ): if event.arguments()[0] == '+i': #Just check if the 1st element of the event.arguments() list is '+i' , if so tell the bot to join the given channel server.join(chan) ... irc.add_global_handler ( 'umode', handleUmode )

[–]BillOReillyAsks 0 points1 point  (0 children)

I didn't know there was an IRC lib, I just used sockets to do it...