If a server sends us a new, expired G-line, create it deactivated (fixes SF #2840365).
authorMichael Poole <mdpoole@troilus.org>
Thu, 7 Jan 2010 02:55:33 +0000 (02:55 +0000)
committerMichael Poole <mdpoole@troilus.org>
Thu, 7 Jan 2010 02:55:33 +0000 (02:55 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1936 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/gline.c

index ff7157f8ea0b16b31884fcfbc738bc256a861596..092c2c668e302788d42d746d6ec9405dee3f9dde 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-01-06  Michael Poole <mdpoole@troilus.org>
+
+       * ircd/gline.c (gline_add): If a forced G-line has already
+       expired, create it in a deactivated state.
+
 2010-01-06  Michael Poole <mdpoole@troilus.org>
 
        * ircd/m_burst.c (ms_burst): Gracefully handle the case where a
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 */