Closed solidgoldbomb closed 9 years ago
Hm, I hate the idea of sleep. If you enable SASL then the auth happens before connect finishes, which is advised. @myano what do you think?
Agreed about using sleep as an interlock being lame but if it's too short then it might as well be removed entirely.
The only reason I was looking at nickserv identify in the logs was because SASL was failing occasionally. Will open an issue for that later with a log (and maybe a fix).
I've run through many tests of disconnect/reconnect while investigating other bugs. With the original sleep of 5s, the first JOIN
always happen before the IDENTIFY
has completed. With 10s, the IDENTIFY
"always" finishes before the first JOIN
. I'm reasonably sure this makes the typical case better, but obviously can't guarantee the order when nickserv is slow for some reason.
Given this occurs at the beginning of startup (e.g., before a user should be able to enter commands) a thread-lock isn't terrible, though at some point I'd love to chain these events more appropriately. @solidgoldbomb can you file an issue that would see us implement a mutex around JOIN on the condition of ident if ident should be enabled by the config?
The IDENTIFY step often takes more than 5s to complete. If the JOINs happen before IDENTIFY completes, the bot's vhost/cloak will not have been applied prior to the JOINs being executed.
Increasing this delay makes it more likely (but obviously not guaranteed) that the bot's vhost has been applied early enough.