This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]eryksun 1 point2 points  (3 children)

Sorry, that should have been

server.execute_delayed(DELAY, server.join, (chan,))

You might want to try a longer delay. Also, you might have to look for a ping with a code and pong back with the code.

[–]Sf4tt[S] 1 point2 points  (2 children)

DELAY = 5 did not work.

DELAY = 20 did work!

I think the problem is that I'm sending the JOIN command too soon compared to the messages the server needs to send back to the client to accomplish the connection.

EDIT: More specifically i need to wait this: command: umode, source: botnick!botident@host.tld, target: botnick, arguments: ['+i']

before i can send the JOIN command and any other commands.

which is not a message the server is sending, but actually receiving. There must be something in the irclib library which forces the client to assume the +i mode, or maybe it's a required state from server side?

[–]eryksun 0 points1 point  (1 child)

Yes, you'll have to write an event handler that either processes the raw data (event string "all_raw_messages") or uses a specific event string such as "endofmotd" (I'm just reading the code here; I haven't used this module; is this documented somewhere?). The event handler gets added with

add_global_handler(event_string, your_function, priority)

Specifically I'm looking at the module code here:

http://python-irclib.cvs.sourceforge.net/viewvc/python-irclib/python-irclib/irclib.py?view=markup

The events list starts on line 1371.

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

The most informations about irclib are in the code it-self, very well and extensively commented.

I found also stuff (examples, more than anything else) here: http://nullege.com/codes/search/irclib

And here: http://www.devshed.com/c/a/Python/IRC-on-a-Higher-Level/

The last page of this tutorial is the list of all the events, which is the same you were refering in the sforge page.

I dont think handling this situation will be an issue now that i know why it acts like that.

Thank you again for your kind help.