Author: Kev <klmitch@mit.edu>
authorKevin L. Mitchell <klmitch@mit.edu>
Thu, 4 May 2000 18:09:47 +0000 (18:09 +0000)
committerKevin L. Mitchell <klmitch@mit.edu>
Thu, 4 May 2000 18:09:47 +0000 (18:09 +0000)
Log message:

1) Don't propagate local changes to jupes and G-lines
2) Force oper-initiated changes of Uworld-set G-lines to be local only
3) Remove Uworld-set G-lines instead of simply deactivating them

git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@236 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/gline.c
ircd/jupe.c
ircd/m_gline.c

index 194c3f8aad2bbbfba9b20f0daa67d307e1239109..c94168fb24a2d6b0ca8540592d3e4874407cc603 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2000-05-04  Kevin L. Mitchell  <klmitch@mit.edu>
 
+       * ircd/gline.c: don't propagate local changes
+
+       * ircd/jupe.c: don't propagate local changes
+
+       * ircd/m_gline.c (mo_gline): force local flag when deactivating
+       glines with 0 lastmod
+
+       * ircd/gline.c (gline_deactivate): G-lines with zero lastmod time
+       are now removed instead of being deactivated
+
        * ircd/m_gline.c (ms_gline): make G-lines of the form "GLINE *
        -<mask>" be accepted
 
 #
 # ChangeLog for ircu2.10.11
 #
-# $Id: ChangeLog,v 1.133 2000-05-04 17:43:47 kev Exp $
+# $Id: ChangeLog,v 1.134 2000-05-04 18:09:46 kev Exp $
 #
 # Insert new changes at beginning of the change list.
 #
index a79f5d8067fb7100e2d3eed82871ce38528855b4..50c8773b6453bdd792f5d98943980910d34faa7c 100644 (file)
@@ -304,7 +304,8 @@ gline_activate(struct Client *cptr, struct Client *sptr, struct Gline *gline,
            gline->gl_expire + TSoffset, gline->gl_reason);
 #endif /* GPATH */
 
-  propagate_gline(cptr, sptr, gline);
+  if (!(flags & GLINE_LOCAL)) /* don't propagate local changes */
+    propagate_gline(cptr, sptr, gline);
 
   return GlineIsBadChan(gline) ? 0 : do_gline(cptr, sptr, gline);
 }
@@ -314,12 +315,19 @@ gline_deactivate(struct Client *cptr, struct Client *sptr, struct Gline *gline,
                 time_t lastmod, unsigned int flags)
 {
   unsigned int saveflags = 0;
+  char *msg;
 
   assert(0 != gline);
 
   saveflags = gline->gl_flags;
 
-  if (!GlineIsLocal(gline)) {
+  if (GlineIsLocal(gline))
+    msg = "removing local";
+  else if (!gline->gl_lastmod && !(flags & GLINE_LOCAL))
+    msg = "removing global";
+  else {
+    msg = "deactivating global";
+
     if (flags & GLINE_LOCAL)
       gline->gl_flags |= GLINE_LDEACT;
     else {
@@ -339,26 +347,22 @@ gline_deactivate(struct Client *cptr, struct Client *sptr, struct Gline *gline,
   sendto_opmask_butone(0, SNO_GLINE, "%s %s %s for %s%s%s, expiring at %Tu: "
                       "%s",
                       IsServer(sptr) ? sptr->name : sptr->user->server->name,
-                      GlineIsLocal(gline) ? "removing local" :
-                      "deactivating global",
-                      GlineIsBadChan(gline) ? "BADCHAN" : "GLINE",
+                      msg, GlineIsBadChan(gline) ? "BADCHAN" : "GLINE",
                       gline->gl_user, GlineIsBadChan(gline) ? "" : "@",
                       GlineIsBadChan(gline) ? "" : gline->gl_host,
                       gline->gl_expire + TSoffset, gline->gl_reason);
 
 #ifdef GPATH
   write_log(GPATH, "# %Tu %C %s %s for %s%s%s, expiring at %Tu: %s\n",
-           TStime(), sptr,
-           GlineIsLocal(gline) ? "removing local" : "deactivating global",
-           GlineIsBadChan(gline) ? "BADCHAN" : "GLINE",
+           TStime(), sptr, msg, GlineIsBadChan(gline) ? "BADCHAN" : "GLINE",
            gline->gl_user, GlineIsBadChan(gline) ? "" : "@",
            GlineIsBadChan(gline) ? "" : gline->gl_host,
            gline->gl_expire + TSoffset, gline->gl_reason);
 #endif /* GPATH */
 
-  if (GlineIsLocal(gline))
+  if (GlineIsLocal(gline) || (!gline->gl_lastmod && !(flags & GLINE_LOCAL)))
     gline_free(gline);
-  else
+  else if (!(flags & GLINE_LOCAL)) /* don't propagate local changes */
     propagate_gline(cptr, sptr, gline);
 
   return 0;
index 9c0f3446bb6b2703a438d9faf73c56606e3d83ce..6fdcc643d043d0cff0341db2fc7293894717f2ea 100644 (file)
@@ -175,7 +175,8 @@ jupe_activate(struct Client *cptr, struct Client *sptr, struct Jupe *jupe,
            jupe->ju_reason);
 #endif /* JPATH */
 
-  propagate_jupe(cptr, sptr, jupe);
+  if (!(flags & JUPE_LOCAL)) /* don't propagate local changes */
+    propagate_jupe(cptr, sptr, jupe);
 
   return do_jupe(cptr, sptr, jupe);
 }
@@ -222,7 +223,7 @@ jupe_deactivate(struct Client *cptr, struct Client *sptr, struct Jupe *jupe,
 
   if (JupeIsLocal(jupe))
     jupe_free(jupe);
-  else
+  else if (!(flags & JUPE_LOCAL)) /* don't propagate local changes */
     propagate_jupe(cptr, sptr, jupe);
 
   return 0;
index 6f5e3d3165d66c02a0183abc2c1ff04a0f058382..cc5915acc2fc0fdd2fe2c57c4f3ccd6577e47af1 100644 (file)
@@ -283,6 +283,9 @@ mo_gline(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
     if (GlineIsLocal(agline) && !(flags & GLINE_LOCAL)) /* global over local */
       gline_free(agline);
     else {
+      if (!GlineLastMod(agline)) /* force mods to Uworld-set G-lines local */
+       flags |= GLINE_LOCAL;
+
       if (flags & GLINE_ACTIVE)
        return gline_activate(cptr, sptr, agline,
                              GlineLastMod(agline) ? TStime() : 0, flags);