diff options
| author | Alexander Barton <alex@barton.de> | 2011-03-21 23:51:53 +0100 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2011-03-21 23:52:42 +0100 |
| commit | 770a58ac6df8099cfa8e7cf3b105ef495f2cf437 (patch) | |
| tree | c5eea826ee8eb10462cc26f6980f83bcbd3c41fd | |
| parent | 15775e67900d914cc174aa80e615fa24d65d115c (diff) | |
| download | ngircd-770a58ac6df8099cfa8e7cf3b105ef495f2cf437.tar.gz ngircd-770a58ac6df8099cfa8e7cf3b105ef495f2cf437.zip | |
Generate WALLOPS message on SQUIT from IRC operator
So SQUIT now behaves like CONNECT and DISCONNECT commands, when called by an IRC operator (and not received from an other server).
| -rw-r--r-- | src/ngircd/irc-server.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ngircd/irc-server.c b/src/ngircd/irc-server.c index b592eb9d..cca295ac 100644 --- a/src/ngircd/irc-server.c +++ b/src/ngircd/irc-server.c @@ -277,6 +277,7 @@ IRC_SQUIT(CLIENT * Client, REQUEST * Req) char msg[COMMAND_LEN], logmsg[COMMAND_LEN]; CLIENT *from, *target; CONN_ID con; + int loglevel; assert(Client != NULL); assert(Req != NULL); @@ -301,7 +302,11 @@ IRC_SQUIT(CLIENT * Client, REQUEST * Req) return IRC_WriteStrClient(Client, ERR_NOSUCHNICK_MSG, Client_ID(Client), Req->prefix); - Log(LOG_DEBUG, "Got SQUIT from %s for \"%s\": \"%s\" ...", + if (Client_Type(Client) == CLIENT_USER) + loglevel = LOG_NOTICE | LOG_snotice; + else + loglevel = LOG_DEBUG; + Log(loglevel, "Got SQUIT from %s for \"%s\": \"%s\" ...", Client_ID(from), Req->argv[0], Req->argv[1]); target = Client_Search(Req->argv[0]); |