MegBot
MegBot copied to clipboard
Nick collisions aren't dealt with at all
At the moment we connect, sit there until we time out and then restart the connection.
We need to deal with two situations here:
- our old connection hasn't timed out and we're using NickServ
- We've chosen a nick that's already in use
There are certain paths we can take, firstly if our chosen nickname is taken we could then see if the nickname field in the config is a list which is decreasing in priority we could try others or modify the nickname we're given adding numbers, underscores, backticks and other markers.
If we're connected and we want to reclaim our nick we could:
- Ghost (some IRCd's don't have services, some services don't have ghost, some services have ghosts but different syntax - than anope/atheme).
- Watching (register an event?) until our chosen nickname quits and/or times out and then reclaiming it with /nick
If we have chosen a nick further into the list of possible nicknames we have to decide if we change our nickname when more desirable nicknames become available, I suggest we do with option in the config to disable this behaviour.
The Server responds with ERR_NICKCOLLISION or ERR_NICKNAMEINUSE (RFC 2812, 3.1.2) for this specific use case. So we could tailor it based off that.