diff options
author | Luke Bratch <luke@bratch.co.uk> | 2019-09-06 20:48:15 +0100 |
---|---|---|
committer | Luke Bratch <luke@bratch.co.uk> | 2019-09-06 20:48:15 +0100 |
commit | fb3963446890cbb966db2d463813d15701cd8fb1 (patch) | |
tree | b03f7e9861f395af46f270d5a2f000853844e90f | |
parent | 79236b70d01c0b355889bd66872c2ae5e64a2aba (diff) |
Add BLABOUNCER HELP as a valid command to avoid the unrecognised command error.
-rw-r--r-- | TODO | 2 | ||||
-rw-r--r-- | message.c | 11 |
2 files changed, 7 insertions, 6 deletions
@@ -12,8 +12,6 @@ Option to include date in replay log replay. Do server operator messages and commands work? -Add BLABOUNCER HELP as a valid command to avoid the unrecognised command error. - (I vaguely recall) some unwanted stuff (channel ban info?) was relayed to another client upon a client connecting. PM replay chat in a channel (or perhaps a random channel?) e.g. replay on 06/09/2019 at 17:05 from 13:49 in #insomnia - maybe a client thing. @@ -1323,11 +1323,14 @@ int processclientmessage(SSL *server_ssl, char *str, struct client *clients, int } return 1; - // Unrecognised BLABOUNCER command received, send some help instructions + // Unrecognised BLABOUNCER command received (or a BLABOUNCER HELP command), send some help instructions } else { - debugprint(DEBUG_SOME, "Client BLABOUNCER unrecognised command found and it is: %s with length %zd! Sending a help message.\n", tokens[1], strlen(tokens[1])); - snprintf(outgoingmsg, MAXDATASIZE, "NOTICE %s :Unrecognised BLABOUNCER command received. Valid commands are:", ircdstate->ircnick); - sendtoclient(sourcefd, outgoingmsg, clients, settings, 0); + // Debug and NOTICE an unrecognised command error unless the command was "HELP" + if (strncasecmp(tokens[1], "HELP", strlen("HELP")) != 0) { + debugprint(DEBUG_SOME, "Client BLABOUNCER unrecognised command found and it is: %s with length %zd! Sending a help message.\n", tokens[1], strlen(tokens[1])); + snprintf(outgoingmsg, MAXDATASIZE, "NOTICE %s :Unrecognised BLABOUNCER command received. Valid commands are:", ircdstate->ircnick); + sendtoclient(sourcefd, outgoingmsg, clients, settings, 0); + } snprintf(outgoingmsg, MAXDATASIZE, "NOTICE %s :\"BLABOUNCER REPLAY [[[days:]hours:]minutes:]\" (To replay a given length of time of replay log.)", ircdstate->ircnick); sendtoclient(sourcefd, outgoingmsg, clients, settings, 0); snprintf(outgoingmsg, MAXDATASIZE, "NOTICE %s :\"BLABOUNCER REHASH\" (To reload settings from the configuration file, see README for which settings can be reloaded.)", ircdstate->ircnick); |