jaraco / irc

Full-featured Python IRC library for Python.
MIT License
392 stars 87 forks source link

on_welcome not called when reconnecting #9

Closed jaraco closed 8 years ago

jaraco commented 8 years ago

When your bot gets kicked from the server for various reasons like "Excess flood" and other things and then reconnects. It does not call on_welcome again. Is this a bug or it is meant to be this way?


jaraco commented 8 years ago

Looking briefly at the code, on_welcome will only be called if the server sends a 'welcome' event. I don't see any reason why the IRC client would not be dispatching that event if the server sent it. My suspicion is that the server isn't sending the welcome message, and that the behavior you describe is expected. It would be hard to tell, though, without an actual test case (or at least documentation indicating that we expect the welcome message from the server in all cases).

Here's what I recommend: write a small script (similar to testbot.py) that reproduces the issue with a public server (in a way that doesn't cause a nuisance), run that script to demonstrate that the issue exists, and then post that script here. From there, we can enable some debugging and determine if there's a failure in the library or if it's working as expected.


Original comment by: Jason R. Coombs

jaraco commented 8 years ago

You can close this. Ill send a pull request fixing this. :)


Original comment by: unconscious

jaraco commented 8 years ago

As written, this report appears invalid. At the very least, more detail is needed to demonstrate the issue. Feel free to re-open or send a pull request.


Original comment by: Jason R. Coombs