diff options
| author | Alexander Barton <alex@barton.de> | 2008-05-06 17:51:45 +0200 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2009-09-30 16:00:05 +0200 |
| commit | 30b584c2e8632f94312dc9575fccc510a2b437c0 (patch) | |
| tree | b5d7c3f1229eab4406a3a613f2bd89f99bcc9cae | |
| parent | eaaf0c3bd5ce4f48205ca928fba994d0c44e59b2 (diff) | |
| download | ngircd-30b584c2e8632f94312dc9575fccc510a2b437c0.tar.gz ngircd-30b584c2e8632f94312dc9575fccc510a2b437c0.zip | |
CONNECT, DISCONNECT: generate WALLOPS messages
| -rw-r--r-- | src/ngircd/irc-oper.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ngircd/irc-oper.c b/src/ngircd/irc-oper.c index aae071bf..08241498 100644 --- a/src/ngircd/irc-oper.c +++ b/src/ngircd/irc-oper.c @@ -16,6 +16,7 @@ #include "imp.h" #include <assert.h> +#include <stdio.h> #include <stdlib.h> #include <string.h> @@ -206,6 +207,7 @@ IRC_RESTART( CLIENT *Client, REQUEST *Req ) GLOBAL bool IRC_CONNECT(CLIENT * Client, REQUEST * Req) { + char msg[LINE_LEN + 64]; assert(Client != NULL); assert(Req != NULL); @@ -223,6 +225,10 @@ IRC_CONNECT(CLIENT * Client, REQUEST * Req) return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG, Client_ID(Client), Req->command); + snprintf(msg, sizeof(msg), "Received CONNECT %s from %s", + Req->argv[0], Client_ID(Client)); + IRC_SendWallops(Client_ThisServer(), Client_ThisServer(), msg); + Log(LOG_NOTICE | LOG_snotice, "Got CONNECT command from \"%s\" for \"%s\".", Client_Mask(Client), Req->argv[0]); @@ -263,6 +269,7 @@ GLOBAL bool IRC_DISCONNECT(CLIENT * Client, REQUEST * Req) { CONN_ID my_conn; + char msg[LINE_LEN + 64]; assert(Client != NULL); assert(Req != NULL); @@ -275,6 +282,10 @@ IRC_DISCONNECT(CLIENT * Client, REQUEST * Req) return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG, Client_ID(Client), Req->command); + snprintf(msg, sizeof(msg), "Received DISCONNECT %s from %s", + Req->argv[0], Client_ID(Client)); + IRC_SendWallops(Client_ThisServer(), Client_ThisServer(), msg); + Log(LOG_NOTICE | LOG_snotice, "Got DISCONNECT command from \"%s\" for \"%s\".", Client_Mask(Client), Req->argv[0]); |