diff options
-rw-r--r-- | TODO | 2 | ||||
-rw-r--r-- | message.c | 10 |
2 files changed, 8 insertions, 4 deletions
@@ -43,3 +43,5 @@ BLABOUNCER/stdin functions to add: KICK not handled. Crash when requesting 30 hour replay. + +"too many clients, disconnecting and skipping loop iteration!" has been seen in the real world, e.g. Wed Jul 12 16:44:57 2023 @@ -748,10 +748,12 @@ int processservermessage(SSL *server_ssl, char *str, struct client *clients, int return 1; } - // Server 432 (ERR_ERRONEUSNICKNAME) or 433 (ERR_NICKNAMEINUSE) received? See which nick we're on and try another. - // (But only if we're not already registered with the real IRC server.) - if ((strncmp(tokens[1], "432", strlen(tokens[1])) == 0 || strncmp(tokens[1], "433", strlen(tokens[1])) == 0) && !strlen(ircdstate->greeting004)) { - debugprint(DEBUG_SOME, "Server 432 (ERR_ERRONEUSNICKNAME) or 433 (ERR_NICKNAMEINUSE) found and it is: %s with length %zd! Trying another nick...\n", + // Server 432 (ERR_ERRONEUSNICKNAME), 433 (ERR_NICKNAMEINUSE), or 437 (ERR_UNAVAILRESOURCE) received? See which nick we're on and try another. + // (But only if we're not already registered with the real IRC server. In particular 437 (ERR_UNAVAILRESOURCE) may be about a channel rather + // our nick, but if we're not registered yet then it's probably about our nick.) + if ((strncmp(tokens[1], "432", strlen(tokens[1])) == 0 || strncmp(tokens[1], "433", strlen(tokens[1])) == 0 || strncmp(tokens[1], "437", strlen(tokens[1])) == 0) + && !strlen(ircdstate->greeting004)) { + debugprint(DEBUG_SOME, "Server 432 (ERR_ERRONEUSNICKNAME), 433 (ERR_NICKNAMEINUSE), or 437 (ERR_UNAVAILRESOURCE) found and it is: %s with length %zd! Trying another nick...\n", tokens[1], strlen(tokens[1])); // Find the nick (its index in the nicks array) currently selected |