jaraco / irc

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

[AIO] Connection real_nickname must not be set before registration #190

Open hifi opened 3 years ago

hifi commented 3 years ago

Some networks (IRCnet in particular) may reserve nicknames temporarily when you disconnect. The network will send 437 ERR_UNAVAILRESOURCE during connection registration which means our real real nickname is not yet actually set.

Having it an empty string or None would help detecting this issue during registration that our desired nickname is not available right now and the downstream implementation can decide what to do with this information, like use a temporary nickname and a timer to retry the real nickname later.

Without any subclassing, currently it is required to wait for 001 before believing real_nickname which will add unnecessary complexity.

hifi commented 3 years ago

Depends on #189 to be useful at pre-registration.