If a server sends us a new, expired G-line, create it deactivated (fixes SF #2840365).
[ircu2.10.12-pk.git] / ircd / gline.c
index 5b5c5b13bd76a2799f046220e0192f97a2bb74f6..dfbf77d2394fdc38e946d9423fa68ba267edb20e 100644 (file)
@@ -503,6 +503,9 @@ gline_add(struct Client *cptr, struct Client *sptr, char *userhost,
     if (!IsServer(sptr) && MyConnect(sptr))
       send_reply(sptr, ERR_BADEXPIRE, expire);
     return 0;
+  } else if (expire <= CurrentTime) {
+    /* This expired G-line was forced to be added, so mark it inactive. */
+    flags &= ~GLINE_ACTIVE;
   }
 
   if (!lifetime) /* no lifetime set, use expiration time */