Author: Kev <klmitch@mit.edu>
[ircu2.10.12-pk.git] / ircd / m_gline.c
index cd930a9da2047a8fe80f1f51aa360b5bf64bb1fd..95e2ac173b29471b0898194b303e27d3543f98e9 100644 (file)
@@ -347,6 +347,18 @@ ms_gline(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
   assert(action != GLINE_LOCAL_DEACTIVATE);
   assert(action != GLINE_MODIFY);
 
+  if (!expire) { /* Cannot *add* a G-line we don't have, but try hard */
+    Debug((DEBUG_DEBUG, "Propagating G-line %s for G-line we don't have",
+          action == GLINE_ACTIVATE ? "activation" : "deactivation"));
+
+    /* propagate the G-line, even though we don't have it */
+    sendcmdto_serv_butone(sptr, CMD_GLINE, cptr, "* %c%s %Tu",
+                         action == GLINE_ACTIVATE ? '+' : '-',
+                         mask, lastmod);
+
+    return 0;
+  }
+
   return gline_add(cptr, sptr, mask, reason, expire, lastmod, lifetime,
                   flags | ((action == GLINE_ACTIVATE) ? GLINE_ACTIVE : 0));
 }