From 0cebf7c6d557d0b76d069af908a2a47366033fde Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Wed, 15 May 2019 22:41:22 +0100 Subject: Add a blabouncer welcome message to clients upon connection. --- blabouncer.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'blabouncer.c') 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); -- cgit v1.2.3