From 27bbf399c2c4e7e5f3ae281a786b95cb9b1aa678 Mon Sep 17 00:00:00 2001 From: Michael Poole Date: Mon, 23 Jan 2012 07:57:10 -0500 Subject: [PATCH] Send "modifying global" messages to SNO_AUTO when appropriate. --- ChangeLog | 5 +++++ ircd/gline.c | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 478d9e4..ff00129 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-01-23 Michael Poole + + * 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 * doc/readme.iauth: Document the new 'd' IAuth command. diff --git a/ircd/gline.c b/ircd/gline.c index d2b2b9b..d25dbfa 100644 --- a/ircd/gline.c +++ b/ircd/gline.c @@ -697,7 +697,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; + int pos = 0, non_auto = 0; assert(gline); assert(!GlineIsLocal(gline)); @@ -841,6 +841,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) @@ -850,7 +851,9 @@ gline_modify(struct Client *cptr, struct Client *sptr, struct Gline *gline, } /* All right, inform ops... */ - 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", -- 2.20.1