]> jfr.im git - irc/quakenet/snircd-patchqueue.git/commitdiff
remoteglinejupe.patch - add wallops for local jupe actions by remote oper
authorwiebe <redacted>
Fri, 30 Jan 2009 17:27:47 +0000 (18:27 +0100)
committerwiebe <redacted>
Fri, 30 Jan 2009 17:27:47 +0000 (18:27 +0100)
remoteglinejupe.patch

index 0be131ff76a36e02e7817b167e186a17745c5ad6..101692c83dff823174ffa413d31b267696c8349b 100644 (file)
@@ -3,10 +3,10 @@ never gets a reply in case of succes
 
 this patch sends a copy of the snomask message shown to local opers to the remote source oper
 
-diff -r 31a4a0514c74 ircd/gline.c
---- a/ircd/gline.c     Mon Jan 12 18:14:17 2009 +0100
-+++ b/ircd/gline.c     Mon Jan 12 18:18:57 2009 +0100
-@@ -589,6 +589,18 @@
+diff -r 8b3f6f6bcfd6 ircd/gline.c
+--- a/ircd/gline.c     Fri Jan 30 17:04:05 2009 +0100
++++ b/ircd/gline.c     Fri Jan 30 18:11:37 2009 +0100
+@@ -584,6 +584,18 @@
            flags & (GLINE_BADCHAN|GLINE_REALNAME) ? "" : host,
            expire + TSoffset, reason);
  
@@ -25,11 +25,10 @@ diff -r 31a4a0514c74 ircd/gline.c
    /* make the gline */
    agline = make_gline(nick, user, host, reason, expire, lastmod, lifetime, flags);
  
-@@ -731,6 +743,17 @@
-           gline->gl_host ? "@" : "",
+@@ -728,6 +740,17 @@
            gline->gl_host ? gline->gl_host : "",
            gline->gl_expire + TSoffset, gline->gl_reason);
-+
 +  /* local gline removed by remote user, inform oper of success */
 +  if ((flags & GLINE_LOCAL) && IsUser(sptr) && !MyUser(sptr))
 +    sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :%s %s %s for %s%s%s%s%s, expiring at %Tu: %s",
@@ -40,10 +39,11 @@ diff -r 31a4a0514c74 ircd/gline.c
 +                     gline->gl_user, gline->gl_host ? "@" : "",
 +                       gline->gl_host ? gline->gl_host : "",
 +                     gline->gl_expire + TSoffset, gline->gl_reason);
++
    if (!(flags & GLINE_LOCAL)) /* don't propagate local changes */
      gline_propagate(cptr, sptr, gline);
-@@ -931,6 +954,16 @@
+@@ -972,6 +995,16 @@
            gline->gl_host ? "@" : "", gline->gl_host ? gline->gl_host : "",
            buf);
  
@@ -60,11 +60,10 @@ diff -r 31a4a0514c74 ircd/gline.c
    /* We'll be simple for this release, but we can update this to change
     * the propagation syntax on future updates
     */
-@@ -977,6 +1010,16 @@
-             GlineIsBadChan(gline)|GlineIsRealName(gline) ? "" : "!",
+@@ -1020,6 +1053,16 @@
              gline->gl_user,
            gline->gl_host ? "@" : "", gline->gl_host ? gline->gl_host : "");
-+
 +  /* local change by remote user, inform oper of success */
 +  if (IsUser(sptr) && !MyUser(sptr))
 +    sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :%s removing local %s for %s%s%s%s%s",
@@ -74,33 +73,54 @@ diff -r 31a4a0514c74 ircd/gline.c
 +                       GlineIsBadChan(gline)|GlineIsRealName(gline) ? "" : "!",
 +                     gline->gl_user, gline->gl_host ? "@" : "",
 +                     gline->gl_host ? gline->gl_host : "");
++
    gline_free(gline); /* get rid of the G-line */
  
-diff -r 31a4a0514c74 ircd/jupe.c
---- a/ircd/jupe.c      Mon Jan 12 18:14:17 2009 +0100
-+++ b/ircd/jupe.c      Mon Jan 12 18:18:57 2009 +0100
-@@ -166,6 +166,11 @@
+   return 0; /* convenience return */
+diff -r 8b3f6f6bcfd6 ircd/jupe.c
+--- a/ircd/jupe.c      Fri Jan 30 17:04:05 2009 +0100
++++ b/ircd/jupe.c      Fri Jan 30 18:11:37 2009 +0100
+@@ -166,6 +166,20 @@
            flags & JUPE_LOCAL ? "local " : "", server, expire + TSoffset,
            reason);
  
-+  /* local jupe set by remote user, inform oper of success */
-+  if ((flags & JUPE_LOCAL) && IsUser(sptr) && !MyUser(sptr))
-+    sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :%s adding local JUPE for %s, expiring at %Tu: %s",
-+      sptr, cli_name(sptr), server, expire + TSoffset, reason);
++  /* local jupe - let's see who else to inform */
++  if (flags & JUPE_LOCAL) {
++
++    /* set by remote oper - inform them about the success */
++    if (IsUser(sptr) && !MyUser(sptr))
++      sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :%s adding local JUPE for %s, expiring at %Tu: %s",
++        sptr, cli_name(sptr), server, expire + TSoffset, reason);
++
++    /* set by remote oper or a server/service - inform all opers */
++    if (!MyUser(sptr))
++      sendwallto_group_butone(&me, WALL_WALLOPS, 0, "%s adding local JUPE for %s, expiring at %Tu: %s",
++        cli_name(sptr), server, expire + TSoffset, reason);
++  }
 +
    /* make the jupe */
    ajupe = make_jupe(server, reason, expire, lastmod, flags);
  
-@@ -274,6 +279,11 @@
-           "%#C %s JUPE for %s, expiring at %Tu: %s", sptr,
+@@ -275,6 +289,22 @@
            JupeIsLocal(jupe) ? "removing local" : "deactivating",
            jupe->ju_server, jupe->ju_expire + TSoffset, jupe->ju_reason);
-+
-+  /* local jupe removed by remote user, inform oper of success */
-+  if ((flags & JUPE_LOCAL) && IsUser(sptr) && !MyUser(sptr))
-+    sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :%s removing local JUPE for %s, expiring at %Tu: %s",
-+      sptr, cli_name(sptr), jupe->ju_server, jupe->ju_expire + TSoffset, jupe->ju_reason);
  
++  /* local jupe - let's see who else to inform */
++  if (flags & JUPE_LOCAL) {
++
++    /* done by remote oper - inform them about the success */
++    if (IsUser(sptr) && !MyUser(sptr))
++      sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :% %s JUPE for %s, expiring at %Tu: %s",
++        sptr, cli_name(sptr), JupeIsLocal(jupe) ? "removing local" : "locally deactivating",
++        jupe->ju_server, jupe->ju_expire + TSoffset, jupe->ju_reason);
++
++    /* done by remote oper or a server/service - inform all opers */
++    if (!MyUser(sptr))
++      sendwallto_group_butone(&me, WALL_WALLOPS, 0, "%s %s JUPE for %s, expiring at %Tu: %s",
++        cli_name(sptr), JupeIsLocal(jupe) ? "removing local" : "locally deactivating",
++        jupe->ju_server, jupe->ju_expire + TSoffset, jupe->ju_reason);
++  }
++
    if (JupeIsLocal(jupe))
      jupe_free(jupe);
+   else if (!(flags & JUPE_LOCAL)) /* don't propagate local changes */