summaryrefslogtreecommitdiff
path: root/message.c
diff options
context:
space:
mode:
Diffstat (limited to 'message.c')
-rw-r--r--message.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/message.c b/message.c
index e30a247..7d50f0a 100644
--- a/message.c
+++ b/message.c
@@ -966,6 +966,8 @@ int processclientmessage(SSL *server_ssl, char *str, struct client *clients, int
sendtoclient(sourcefd, outgoingmsg, clients, settings, 0);
snprintf(outgoingmsg, MAXDATASIZE, "NOTICE %s :\"BLABOUNCER QUIT [quit message]\" (To quit blabouncer, optionally sending [quit message] to the server.)", ircdstate->ircnick);
sendtoclient(sourcefd, outgoingmsg, clients, settings, 0);
+ snprintf(outgoingmsg, MAXDATASIZE, "NOTICE %s :\"BLABOUNCER VERSION\" (To show the current blabouncer version.)", ircdstate->ircnick);
+ sendtoclient(sourcefd, outgoingmsg, clients, settings, 0);
// Get the channel count so we can iterate over all channels.
int channelcount = getchannelcount(channels, ircdstate->maxchannelcount);
@@ -1426,6 +1428,12 @@ int processclientmessage(SSL *server_ssl, char *str, struct client *clients, int
}
return 1;
+ // VERSION received, send current blabouncer version
+ } else if (strncasecmp(tokens[1], "VERSION", strlen("VERSION")) == 0) {
+ debugprint(DEBUG_SOME, "Client BLABOUNCER VERSION found and it is: %s with length %zd!\n", tokens[1], strlen(tokens[1]));
+ snprintf(outgoingmsg, MAXDATASIZE, "NOTICE %s :This is blabouncer version %s!", ircdstate->ircnick, VERSION);
+ sendtoclient(sourcefd, outgoingmsg, clients, settings, 0);
+ return 1;
// Unrecognised BLABOUNCER command received (or a BLABOUNCER HELP command), send some help instructions
} else {
// Debug and NOTICE an unrecognised command error unless the command was "HELP"
@@ -1442,6 +1450,8 @@ int processclientmessage(SSL *server_ssl, char *str, struct client *clients, int
sendtoclient(sourcefd, outgoingmsg, clients, settings, 0);
snprintf(outgoingmsg, MAXDATASIZE, "NOTICE %s :\"BLABOUNCER QUIT [quit message]\" (To quit blabouncer, optionally sending [quit message] to the server.)", ircdstate->ircnick);
sendtoclient(sourcefd, outgoingmsg, clients, settings, 0);
+ snprintf(outgoingmsg, MAXDATASIZE, "NOTICE %s :\"BLABOUNCER VERSION\" (To show the current blabouncer version.)", ircdstate->ircnick);
+ sendtoclient(sourcefd, outgoingmsg, clients, settings, 0);
return 1;
}
}