jaraco / irc

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

[AIO] Registering a connection needs to be split out of connect() #189

Open hifi opened 3 years ago

hifi commented 3 years ago

To implement CAP negotiations (for SASL) before registering a connection I had to split connection registration out of AioConnection::connect(): https://github.com/hifi/heisenbridge/blob/master/heisenbridge/irc.py#L120

My implementation is currently ugly but the requirement remains that registration needs to be split out either optionally (arg for connect to disable?) or by changing the API to require calling register() after connect().

I can PR an accepted solution.

hifi commented 3 years ago

I'll take the ugly part back, I refactored it to expect() flow.