diff options
-rw-r--r-- | TODO | 2 | ||||
-rw-r--r-- | functions.c | 8 | ||||
-rw-r--r-- | message.c | 2 |
3 files changed, 6 insertions, 6 deletions
@@ -56,8 +56,6 @@ Ability to check for updates (and optional at startup?). Absurd CPU usage and duration doing "/BLABOUNCER REPLAY 24:0" approx. 14/09/2024 17:35. -User has quit not always listed in all channel log files? (e.g. lebhome 12/11/2024 22:49:37) - Custom OpenSSL protocols/ciphers? NickServ HELP with SA receiving full message in one go? e.g. oper 05/01/2025 10:06:22. Blabouncer or Anope or UnrealIRCD or something else? diff --git a/functions.c b/functions.c index 8ef2b21..54e2663 100644 --- a/functions.c +++ b/functions.c @@ -1596,7 +1596,7 @@ int isnickinanychannel(struct channel *channels, int maxchannelcount, char *nick return 0; } -// Populate our channels struct with all nicks in a RPL_NAMREPLY +// Populate our channels struct with all nicks in a 353 RPL_NAMREPLY // Returns 1 on success or 0 on failure int addnamereplytochannel(char *namereply, struct channel *channels, int maxchannelcount) { //:irc.tghost.co.uk 353 blabounce = #blabouncer :blabounce bbnick ~@l_bratch @l_blabnc Hughbla Bratchbot ars @@ -1609,10 +1609,12 @@ int addnamereplytochannel(char *namereply, struct channel *channels, int maxchan // Strip the leading ':' stripprefix(strcopy, 1); - // Find the start of the channel name, which comes after the first '=' followed by a space + // Find the start of the channel name, which comes after the first '=', '*', or '@', followed by a space + // From RFC 2812: + // "@" is used for secret channels, "*" for private channels, and "=" for others (public channels). int channelpos = -1; for (size_t i = 0; i < strlen(strcopy) - 2; i++) { - if (strcopy[i] == '=' && strcopy[i + 1] == ' ' && strcopy[i + 2] != '\0') { + if ((strcopy[i] == '=' || strcopy[i] == '*' || strcopy[i] == '@') && strcopy[i + 1] == ' ' && strcopy[i + 2] != '\0') { // Name found channelpos = i + 2; break; @@ -384,7 +384,7 @@ int processservermessage(SSL *server_ssl, char *str, struct client *clients, int // Update our local channels struct with all nicks from this RPL_NAMREPLY if (!addnamereplytochannel(str, channels, ircdstate->maxchannelcount)) { - debugprint(DEBUG_CRIT, "Failed to add RPL_NAMREPLY to channels.\n"); + debugprint(DEBUG_CRIT, "processservermessage(): Failed to add RPL_NAMREPLY to channels.\n"); } return 1; |