summaryrefslogtreecommitdiff
path: root/message.c
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2019-09-06 20:48:15 +0100
committerLuke Bratch <luke@bratch.co.uk>2019-09-06 20:48:15 +0100
commitfb3963446890cbb966db2d463813d15701cd8fb1 (patch)
treeb03f7e9861f395af46f270d5a2f000853844e90f /message.c
parent79236b70d01c0b355889bd66872c2ae5e64a2aba (diff)
Add BLABOUNCER HELP as a valid command to avoid the unrecognised command error.
Diffstat (limited to 'message.c')
-rw-r--r--message.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/message.c b/message.c
index 6aa2725..f360e99 100644
--- a/message.c
+++ b/message.c
@@ -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);