jaraco / irc

Full-featured Python IRC library for Python.
MIT License
390 stars 84 forks source link

Update connection password without exiting #163

Closed ykram closed 4 years ago

ykram commented 4 years ago

I might just be overlooking something simple but is there a way to update the password used to connect to an IRC server and then force a reconnect using the new credentials?

jaraco commented 4 years ago

If you have a ServerConnection (or SimpleIRCClient with a .connection), you can invoke .connect(...) on that connection with whatever args were invoked before, replacing then new password. There is a method .reconnect() that does this, but it doesn't provide a way to replace the password (and remembers what was passed, not what's currently set). But maybe that gives you some ideas on how you might accomplish what you need.

jaraco commented 4 years ago

Feel free to re-open if you have more questions.