summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2019-05-15 22:41:22 +0100
committerLuke Bratch <luke@bratch.co.uk>2019-05-15 22:41:22 +0100
commit0cebf7c6d557d0b76d069af908a2a47366033fde (patch)
tree50389b0e09abb2cbd3a9a6e47a3c524bbcd0d5ed
parentf5ddf5273300870c6a95279046d692d975789f59 (diff)
Add a blabouncer welcome message to clients upon connection.
-rw-r--r--blabouncer.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/blabouncer.c b/blabouncer.c
index 2e7dc7f..2bf2138 100644
--- a/blabouncer.c
+++ b/blabouncer.c
@@ -731,6 +731,16 @@ int processircmessage(SSL *server_ssl, int *clientsockfd, char *str, int source,
snprintf(outgoingmsg, MAXDATASIZE, "%s", ircdstrings->greeting004);
sendtoclient(sourcefd, outgoingmsg, arr_clients, arr_authed, arr_ssl, settings);
+ // Send our own greeting message
+ snprintf(outgoingmsg, MAXDATASIZE, "NOTICE %s :Welcome to blabouncer!", settings->ircnick);
+ sendtoclient(sourcefd, outgoingmsg, arr_clients, arr_authed, arr_ssl, settings);
+ snprintf(outgoingmsg, MAXDATASIZE, "NOTICE %s :Blabouncer commands are all prefixed with BLABOUNCER which you can usually send using \"/QUOTE BLABOUNCER\"", settings->ircnick);
+ sendtoclient(sourcefd, outgoingmsg, arr_clients, arr_authed, arr_ssl, settings);
+ snprintf(outgoingmsg, MAXDATASIZE, "NOTICE %s :Valid blabouncer commands are:", settings->ircnick);
+ sendtoclient(sourcefd, outgoingmsg, arr_clients, arr_authed, arr_ssl, settings);
+ snprintf(outgoingmsg, MAXDATASIZE, "NOTICE %s :\"BLABOUNCER REPLAY [seconds]\" (Where [seconds] is the number of seconds of replay log to replay.)", settings->ircnick);
+ sendtoclient(sourcefd, outgoingmsg, arr_clients, arr_authed, arr_ssl, settings);
+
// Get the channel count so we can enumerate over all channels.
// Storing separately so we can skip over blank channels.
int channelcount = getchannelcount(channels);