]> arthur.barton.de Git - ngircd.git/commitdiff
Log G-/K-Line changes only when not initiated by a server
authorAlexander Barton <alex@barton.de>
Sun, 3 May 2020 01:08:41 +0000 (03:08 +0200)
committerAlexander Barton <alex@barton.de>
Sun, 3 May 2020 01:15:49 +0000 (03:15 +0200)
This prevents the log from becomming spammed during "net bursts".

src/ngircd/irc-oper.c

index e877213ef7629f14c0a10593e6c389d5b0bcd76d..ae333b1018d1156f74414ee6c41ae7971ec32b10 100644 (file)
@@ -447,10 +447,11 @@ IRC_xLINE(CLIENT *Client, REQUEST *Req)
                if (Class_AddMask(class, Req->argv[0],
                                  timeout,
                                  Req->argv[2])) {
-                       Log(LOG_NOTICE|LOG_snotice,
-                           "\"%s\" added \"%s\" to %c-Line list: \"%s\" (%ld seconds).",
-                           Client_Mask(from), Req->argv[0], class_c,
-                           Req->argv[2], atol(Req->argv[1]));
+                       if (Client_Type(from) != CLIENT_SERVER)
+                               Log(LOG_NOTICE|LOG_snotice,
+                                   "\"%s\" added \"%s\" to %c-Line list: \"%s\" (%ld seconds).",
+                                   Client_Mask(from), Req->argv[0], class_c,
+                                   Req->argv[2], atol(Req->argv[1]));
                        if (class == CLASS_GLINE) {
                                /* Inform other servers */
                                IRC_WriteStrServersPrefix(Client, from,