keep in sync with OGN upstream (SVN-321)
authorpk910 <philipp@zoelle1.de>
Thu, 10 May 2012 21:15:17 +0000 (23:15 +0200)
committerpk910 <philipp@zoelle1.de>
Thu, 10 May 2012 21:15:17 +0000 (23:15 +0200)
ChangeLog
ircd/gline.c
ircd/s_auth.c

index edc241637b025fccd20d656243e08abb680019a1..9f6e8e72b22eb42bcbb5dbdd8a1cb1914c028c82 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2011-01-23 Michael Poole <mdpoole@troilus.org>
+
+       * ircd/gline.c (gline_modify): Notify opers using SNO_AUTO rather
+       than SNO_GLINE if a G-line had, and still has, an AUTO prefix.
+
+2011-01-19 Michael Poole <mdpoole@troilus.org>
+
+       * ircd/s_auth.c (start_auth): Call start_dns_query() and
+       start_auth_query() after start_iauth_query() rather than
+       before.
+
 2011-08-17  Kevin L. Mitchell <klmitch@mit.edu>
 
        * include/client.h: Fix minor issue in IsLocOp() test
index 24be0026a7eb2ecbc04c7331ac6051143c94f5c8..243e36e5b6c3f094a3d1861295f6be572d93c560 100644 (file)
@@ -721,7 +721,7 @@ gline_modify(struct Client *cptr, struct Client *sptr, struct Gline *gline,
             time_t lastmod, time_t lifetime, unsigned int flags)
 {
   char buf[BUFSIZE], *op = "";
-  int pos = 0, disable_gl = 0;
+  int pos = 0, non_auto = 0, disable_gl = 0;
 
   assert(gline);
   assert(!GlineIsLocal(gline));
@@ -872,6 +872,7 @@ gline_modify(struct Client *cptr, struct Client *sptr, struct Gline *gline,
 
   /* Now, handle reason changes... */
   if (flags & GLINE_REASON) {
+    non_auto = non_auto || ircd_strncmp(gline->gl_reason, "AUTO", 4);
     MyFree(gline->gl_reason); /* release old reason */
     DupString(gline->gl_reason, reason); /* store new reason */
     if (pos < BUFSIZE)
@@ -886,7 +887,9 @@ gline_modify(struct Client *cptr, struct Client *sptr, struct Gline *gline,
      * However, we additionally save the exact message in the log, so we have both information
      * in there. But the ops don't need to be bothered twice.
      */
-    sendto_opmask_butone(0, SNO_GLINE, "%s deleting global %s for %s%s%s",
+    non_auto = non_auto || ircd_strncmp(gline->gl_reason, "AUTO", 4);
+    sendto_opmask_butone(0, non_auto ? SNO_GLINE : SNO_AUTO,
+             "%s deleting global %s for %s%s%s",
                       (feature_bool(FEAT_HIS_SNOTICES) || IsServer(sptr)) ?
                       cli_name(sptr) : cli_name((cli_user(sptr))->server),
                       GlineIsBadChan(gline) ? "BADCHAN" : "GLINE",
@@ -898,7 +901,9 @@ gline_modify(struct Client *cptr, struct Client *sptr, struct Gline *gline,
            gline->gl_host ? "@" : "", gline->gl_host ? gline->gl_host : "");
   }
   else {
-    sendto_opmask_butone(0, SNO_GLINE, "%s modifying global %s for %s%s%s:%s",
+    non_auto = non_auto || ircd_strncmp(gline->gl_reason, "AUTO", 4);
+    sendto_opmask_butone(0, non_auto ? SNO_GLINE : SNO_AUTO,
+            "%s modifying global %s for %s%s%s:%s",
                       (feature_bool(FEAT_HIS_SNOTICES) || IsServer(sptr)) ?
                       cli_name(sptr) : cli_name((cli_user(sptr))->server),
                       GlineIsBadChan(gline) ? "BADCHAN" : "GLINE",
index de5d64586de95ae303fb2cb799ac140b1bc6a4ca..71c86385db89e66b589a99c4abae9ecc37da5a65 100644 (file)
@@ -1328,12 +1328,6 @@ void start_auth(struct Client* client)
   /* Set unregistered numnick. */
   auth_set_numnick(auth);
 
-  /* Try to start DNS lookup. */
-  start_dns_query(auth);
-
-  /* Try to start ident lookup. */
-  start_auth_query(auth);
-
   /* Set required client inputs for users. */
   if (IsUserPort(client)) {
     cli_user(client) = make_user(client);
@@ -1345,6 +1339,12 @@ void start_auth(struct Client* client)
     if(start_iauth_query(auth)) return;
   }
 
+  /* Try to start DNS lookup. */
+  start_dns_query(auth);
+
+  /* Try to start ident lookup. */
+  start_auth_query(auth);
+
   /* Add client to GlobalClientList. */
   add_client_to_list(client);