This prefix must not be used until the entire network
and services are upgraded to handle it!
-diff -r a4507a57b7cd include/gline.h
---- a/include/gline.h Sun Jan 18 21:11:24 2009 +0100
-+++ b/include/gline.h Sun Jan 18 23:19:34 2009 +0100
+diff -r 8dcf56ed67b9 include/gline.h
+--- a/include/gline.h Sun Feb 15 15:31:50 2009 +0100
++++ b/include/gline.h Sun Feb 15 15:59:10 2009 +0100
@@ -88,8 +88,10 @@
#define GLINE_LIFETIME 0x2000 /**< Record lifetime update */
#define GLINE_REASON 0x4000 /**< Reason update */
/** Return nick mask of a G-line. */
#define GlineNick(g) ((g)->gl_nick)
-diff -r a4507a57b7cd ircd/gline.c
---- a/ircd/gline.c Sun Jan 18 21:11:24 2009 +0100
-+++ b/ircd/gline.c Sun Jan 18 23:19:35 2009 +0100
+diff -r 8dcf56ed67b9 ircd/gline.c
+--- a/ircd/gline.c Sun Feb 15 15:31:50 2009 +0100
++++ b/ircd/gline.c Sun Feb 15 15:59:10 2009 +0100
@@ -278,7 +278,7 @@
gline->gl_reason);
GlineIsRemActive(gline) ? '+' : '-',
GlineIsBadChan(gline)|GlineIsRealName(gline) ? "" : gline->gl_nick,
GlineIsBadChan(gline)|GlineIsRealName(gline) ? "" : "!",
-@@ -555,8 +556,8 @@
+@@ -555,9 +556,8 @@
/* lifetime is already an absolute timestamp */
/* Inform ops... */
- sendto_opmask_butone(0, ircd_strncmp(reason, "AUTO", 4) ? SNO_GLINE :
-- SNO_AUTO, "%s adding %s %s for %s%s%s%s%s, expiring at "
+- SNO_AUTO, "%s adding %s%s %s for %s%s%s%s%s, expiring at "
+- "%Tu: %s",
+ sendto_opmask_butone(0, (flags & GLINE_AUTO) ? SNO_AUTO : SNO_GLINE,
-+ "%s adding %s %s for %s%s%s%s%s, expiring at "
- "%Tu: %s",
++ "%s adding %s%s %s for %s%s%s%s%s, expiring at %Tu: %s",
(feature_bool(FEAT_HIS_SNOTICES) || IsServer(sptr)) ?
cli_name(sptr) :
-@@ -630,7 +631,8 @@
+ cli_name((cli_user(sptr))->server),
+@@ -631,7 +631,8 @@
return 0; /* was active to begin with */
/* Inform ops and log it */
"expiring at %Tu: %s",
(feature_bool(FEAT_HIS_SNOTICES) || IsServer(sptr)) ?
cli_name(sptr) :
-@@ -756,7 +758,8 @@
- lifetime = expire;
+@@ -704,8 +705,8 @@
+ }
/* Inform ops and log it */
-- sendto_opmask_butone(0, SNO_GLINE, "%s %s GLINE for %s, expiring at %Tu",
-+ sendto_opmask_butone(0, (flags & GLINE_AUTO) ? SNO_AUTO : SNO_GLINE,
-+ "%s %s GLINE for %s, expiring at %Tu",
+- sendto_opmask_butone(0, SNO_GLINE, "%s %s %s for %s%s%s%s%s, expiring at %Tu: "
+- "%s",
++ sendto_opmask_butone(0, GlineIsAuto(gline) ? SNO_AUTO : SNO_GLINE,
++ "%s %s %s for %s%s%s%s%s, expiring at %Tu: %s",
(feature_bool(FEAT_HIS_SNOTICES) || IsServer(sptr)) ?
- cli_name(sptr) : cli_name((cli_user(sptr))->server),
- msg, userhost, expire + TSoffset);
-@@ -765,7 +768,8 @@
- "%#C %s GLINE for %s, expiring at %Tu", sptr, msg, userhost,
- expire);
-
-- sendcmdto_serv_butone(sptr, CMD_GLINE, cptr, "* -%s %Tu %Tu %Tu",
-+ sendcmdto_serv_butone(sptr, CMD_GLINE, cptr, "* %s-%s %Tu %Tu %Tu",
-+ (flags & GLINE_AUTO) ? "=" : "",
- userhost, expire, lastmod, lifetime);
-
- return 0;
-@@ -912,6 +916,12 @@
+ cli_name(sptr) :
+ cli_name((cli_user(sptr))->server),
+@@ -877,6 +878,12 @@
break;
}
/* Handle expiration changes... */
if (flags & GLINE_EXPIRE) {
gline->gl_expire = expire; /* save new expiration time */
-@@ -944,7 +954,8 @@
+@@ -909,7 +916,8 @@
}
/* All right, inform ops... */
- sendto_opmask_butone(0, SNO_GLINE, "%s modifying global %s for %s%s%s%s%s:%s",
-+ sendto_opmask_butone(0, flags & GLINE_AUTO ? SNO_GLINE : SNO_GLINE,
++ sendto_opmask_butone(0, GlineIsAuto(gline) ? SNO_AUTO : SNO_GLINE,
+ "%s modifying global %s for %s%s%s%s%s:%s",
(feature_bool(FEAT_HIS_SNOTICES) || IsServer(sptr)) ?
cli_name(sptr) : cli_name((cli_user(sptr))->server),
GlineIsBadChan(gline) ? "BADCHAN" : "GLINE",
-@@ -965,7 +976,8 @@
+@@ -930,7 +938,8 @@
*/
if (action != GLINE_LOCAL_ACTIVATE && action != GLINE_LOCAL_DEACTIVATE)
sendcmdto_serv_butone(sptr, CMD_GLINE, cptr,
- "* %s%s%s%s%s%s%s %Tu %Tu %Tu :%s",
+ "* %s%s%s%s%s%s%s%s %Tu %Tu %Tu :%s",
-+ (flags & GLINE_AUTO) ? "=" : "",
++ GlineIsAuto(gline) ? "=" : "",
flags & GLINE_OPERFORCE ? "!" : "", op,
GlineIsBadChan(gline)|GlineIsRealName(gline) ? "" : gline->gl_nick,
GlineIsBadChan(gline)|GlineIsRealName(gline) ? "" : "!",
-@@ -1179,8 +1191,9 @@
+@@ -956,7 +965,8 @@
+ assert(GlineIsLocal(gline));
+
+ /* Inform ops and log it */
+- sendto_opmask_butone(0, SNO_GLINE, "%s removing local %s for %s%s%s%s%s",
++ sendto_opmask_butone(0, GlineIsAuto(gline) ? SNO_AUTO : SNO_GLINE,
++ "%s removing local %s for %s%s%s%s%s",
+ (feature_bool(FEAT_HIS_SNOTICES) || IsServer(sptr)) ?
+ cli_name(sptr) : cli_name((cli_user(sptr))->server),
+ GlineIsBadChan(gline) ? "BADCHAN" : "GLINE",
+@@ -1144,8 +1154,9 @@
gliter(GlobalGlineList, gline, sgline) {
if (!GlineIsLocal(gline) && gline->gl_lastmod)
gline->gl_nick ? gline->gl_nick : "",
gline->gl_nick ? "!" : "",
gline->gl_user,
-@@ -1192,7 +1205,8 @@
+@@ -1157,7 +1168,8 @@
gliter(BadChanGlineList, gline, sgline) {
if (!GlineIsLocal(gline) && gline->gl_lastmod)
GlineIsRemActive(gline) ? '+' : '-', gline->gl_user,
gline->gl_expire - CurrentTime, gline->gl_lastmod,
gline->gl_lifetime, gline->gl_reason);
-@@ -1210,7 +1224,8 @@
+@@ -1175,7 +1187,8 @@
if (GlineIsLocal(gline) || !gline->gl_lastmod)
return 0;
GlineIsRemActive(gline) ? '+' : '-',
GlineIsBadChan(gline)|GlineIsRealName(gline) ? "" : gline->gl_nick,
GlineIsBadChan(gline)|GlineIsRealName(gline) ? "" : "!",
-@@ -1249,6 +1264,7 @@
+@@ -1214,6 +1227,7 @@
gline->gl_expire + TSoffset, gline->gl_lastmod,
gline->gl_lifetime + TSoffset,
GlineIsLocal(gline) ? cli_name(&me) : "*",
gline->gl_state == GLOCAL_ACTIVATED ? ">" :
(gline->gl_state == GLOCAL_DEACTIVATED ? "<" : ""),
GlineIsRemActive(gline) ? '+' : '-', gline->gl_reason);
-@@ -1263,6 +1279,7 @@
+@@ -1228,6 +1242,7 @@
gline->gl_expire + TSoffset, gline->gl_lastmod,
gline->gl_lifetime + TSoffset,
GlineIsLocal(gline) ? cli_name(&me) : "*",
gline->gl_state == GLOCAL_ACTIVATED ? ">" :
(gline->gl_state == GLOCAL_DEACTIVATED ? "<" : ""),
GlineIsRemActive(gline) ? '+' : '-', gline->gl_reason);
-@@ -1273,6 +1290,7 @@
+@@ -1238,6 +1253,7 @@
gline->gl_expire + TSoffset, gline->gl_lastmod,
gline->gl_lifetime + TSoffset,
GlineIsLocal(gline) ? cli_name(&me) : "*",
gline->gl_state == GLOCAL_ACTIVATED ? ">" :
(gline->gl_state == GLOCAL_DEACTIVATED ? "<" : ""),
GlineIsRemActive(gline) ? '+' : '-', gline->gl_reason);
-@@ -1304,6 +1322,7 @@
+@@ -1273,6 +1289,7 @@
gline->gl_host ? gline->gl_host : "",
gline->gl_expire + TSoffset, gline->gl_lastmod,
gline->gl_lifetime + TSoffset,
gline->gl_state == GLOCAL_ACTIVATED ? ">" :
(gline->gl_state == GLOCAL_DEACTIVATED ? "<" : ""),
GlineIsRemActive(gline) ? '+' : '-',
-@@ -1314,6 +1333,7 @@
+@@ -1283,6 +1300,7 @@
send_reply(sptr, RPL_STATSGLINE, 'G', gline->gl_user, "", "", "", "",
gline->gl_expire + TSoffset, gline->gl_lastmod,
gline->gl_lifetime + TSoffset,
gline->gl_state == GLOCAL_ACTIVATED ? ">" :
(gline->gl_state == GLOCAL_DEACTIVATED ? "<" : ""),
GlineIsRemActive(gline) ? '+' : '-', gline->gl_reason);
-diff -r a4507a57b7cd ircd/m_gline.c
---- a/ircd/m_gline.c Sun Jan 18 21:11:24 2009 +0100
-+++ b/ircd/m_gline.c Sun Jan 18 23:19:35 2009 +0100
+diff -r 8dcf56ed67b9 ircd/m_gline.c
+--- a/ircd/m_gline.c Sun Feb 15 15:31:50 2009 +0100
++++ b/ircd/m_gline.c Sun Feb 15 15:59:10 2009 +0100
@@ -140,6 +140,11 @@
if (IsServer(sptr))
flags |= GLINE_FORCE;
Debug((DEBUG_DEBUG, "I am forwarding a local change to a global gline "
- "to a remote server; target %s, mask %s, operforce %s, action %c",
- target, mask, flags & GLINE_OPERFORCE ? "YES" : "NO",
-+ "to a remote server; target %s, mask %s, operforce %s, auto %s, action %c",
++ "to a remote server; target %s, mask %s, auto %s, operforce %s, action %c",
+ target, mask,
-+ flags & GLINE_OPERFORCE ? "YES" : "NO",
+ flags & GLINE_AUTO ? "YES" : "NO",
++ flags & GLINE_OPERFORCE ? "YES" : "NO",
action == GLINE_LOCAL_ACTIVATE ? '>' : '<'));
- sendcmdto_one(sptr, CMD_GLINE, acptr, "%C %s%c%s", acptr,
Debug((DEBUG_DEBUG, "I am creating a local G-line here; target %s, "
- "mask %s, operforce %s, action %s, expire %Tu, reason: %s",
- target, mask, flags & GLINE_OPERFORCE ? "YES" : "NO",
-+ "mask %s, operforce %s, auto %s, action %s, expire %Tu, reason: %s",
++ "mask %s, auto %s, operforce %s, action %s, expire %Tu, reason: %s",
+ target, mask,
-+ flags & GLINE_OPERFORCE ? "YES" : "NO",
+ flags & GLINE_AUTO ? "YES" : "NO",
++ flags & GLINE_OPERFORCE ? "YES" : "NO",
action == GLINE_ACTIVATE ? "+" : "-", expire, reason));
return gline_add(cptr, sptr, mask, reason, expire, lastmod,
-@@ -239,8 +249,9 @@
+@@ -239,7 +249,8 @@
/* Let's now destroy the G-line */;
Debug((DEBUG_DEBUG, "I am destroying a local G-line here; target %s, "
- "mask %s, operforce %s, action %s", target, mask,
-+ "mask %s, operforce %s, auto %s, action %s", target, mask,
- flags & GLINE_OPERFORCE ? "YES" : "NO",
++ "mask %s, auto %s, operforce %s, action %s", target, mask,
+ flags & GLINE_AUTO ? "YES" : "NO",
+ flags & GLINE_OPERFORCE ? "YES" : "NO",
action == GLINE_ACTIVATE ? "+" : "-"));
- return gline_destroy(cptr, sptr, agline);
@@ -255,14 +266,17 @@
assert(!IsMe(acptr));
Debug((DEBUG_DEBUG, "I am forwarding a local G-line to a remote server; "
- "target %s, mask %s, operforce %s, action %c, expire %Tu, "
-+ "target %s, mask %s, operforce %s, auto %s, action %c, expire %Tu, "
++ "target %s, mask %s, auto %s, operforce %s, action %c, expire %Tu, "
"lastmod %Tu, reason: %s", target, mask,
- flags & GLINE_OPERFORCE ? "YES" : "NO",
+ flags & GLINE_AUTO ? "YES" : "NO",
+ flags & GLINE_OPERFORCE ? "YES" : "NO",
action == GLINE_ACTIVATE ? '+' : '-', expire, CurrentTime,
reason));
action == GLINE_ACTIVATE ? '+' : '-', mask,
expire - CurrentTime, CurrentTime, reason);
-@@ -323,10 +337,11 @@
+@@ -323,9 +337,10 @@
return need_more_params(sptr, "GLINE");
Debug((DEBUG_DEBUG, "I have a global G-line I am acting upon now; "
- "target %s, mask %s, operforce %s, action %s, expire %Tu, "
-+ "target %s, mask %s, operforce %s, auto %s, action %s, expire %Tu, "
++ "target %s, mask %s, auto %s, operforce %s, action %s, expire %Tu, "
"lastmod %Tu, lifetime %Tu, reason: %s; gline %s! (fields "
"present: %s %s %s)", target, mask,
- flags & GLINE_OPERFORCE ? "YES" : "NO",
+ flags & GLINE_AUTO ? "YES" : "NO",
+ flags & GLINE_OPERFORCE ? "YES" : "NO",
action == GLINE_ACTIVATE ? "+" :
(action == GLINE_DEACTIVATE ? "-" :
- (action == GLINE_LOCAL_ACTIVATE ? ">" :
@@ -353,7 +368,8 @@
action == GLINE_ACTIVATE ? "activation" : "deactivation"));
action == GLINE_ACTIVATE ? '+' : '-',
mask, lastmod);
-@@ -387,6 +403,10 @@
- return send_reply(sptr, ERR_NOPRIVILEGES);
- else
+@@ -389,6 +405,10 @@
return gline_list(sptr, 0);
-+ }
-+
-+ if (*mask == '=') { /* ignore auto prefix from oper */
-+ mask++;
}
++ /* ignore auto prefix from oper */
++ if (*mask == '=')
++ mask++;
++
if (*mask == '!') {
-@@ -506,11 +526,14 @@
- return send_reply(sptr, ERR_NOPRIVILEGES);
-
- Debug((DEBUG_DEBUG, "I am forwarding a local change to a global gline "
-- "to a remote server; target %s, mask %s, operforce %s, action %c",
-- cli_name(acptr), mask, flags & GLINE_OPERFORCE ? "YES" : "NO",
-+ "to a remote server; target %s, mask %s, operforce %s, auto %s, action %c",
-+ cli_name(acptr), mask,
-+ flags & GLINE_OPERFORCE ? "YES" : "NO",
-+ flags & GLINE_AUTO ? "YES" : "NO",
- action == GLINE_LOCAL_ACTIVATE ? '>' : '<'));
-
- sendcmdto_one(sptr, CMD_GLINE, acptr, "%C %s%c%s", acptr,
-+ flags & GLINE_AUTO ? "=" : "",
- flags & GLINE_OPERFORCE ? "!" : "",
- action == GLINE_LOCAL_ACTIVATE ? '>' : '<', mask);
-
-@@ -544,13 +567,16 @@
- return send_reply(sptr, ERR_NOPRIVILEGES);
-
- Debug((DEBUG_DEBUG, "I am forwarding a local G-line to a remote "
-- "server; target %s, mask %s, operforce %s, action %c, "
-+ "server; target %s, mask %s, operforce %s, auto %s, action %c, "
- "expire %Tu, reason %s", target, mask,
- flags & GLINE_OPERFORCE ? "YES" : "NO",
-+ flags & GLINE_AUTO ? "YES" : "NO",
- action == GLINE_ACTIVATE ? '+' : '-', expire, reason));
-
-- sendcmdto_one(sptr, CMD_GLINE, acptr, "%C %s%c%s %Tu %Tu :%s",
-- acptr, flags & GLINE_OPERFORCE ? "!" : "",
-+ sendcmdto_one(sptr, CMD_GLINE, acptr, "%C %s%s%c%s %Tu %Tu :%s",
-+ acptr,
-+ flags & GLINE_AUTO ? "=" : "",
-+ flags & GLINE_OPERFORCE ? "!" : "",
- action == GLINE_ACTIVATE ? '+' : '-', mask,
- expire - CurrentTime, CurrentTime, reason);
-
-@@ -568,8 +594,10 @@
-
- /* OK, create the local G-line */
- Debug((DEBUG_DEBUG, "I am creating a local G-line here; target %s, "
-- "mask %s, operforce %s, action %s, expire %Tu, reason: %s",
-- target, mask, flags & GLINE_OPERFORCE ? "YES" : "NO",
-+ "mask %s, operforce %s, auto %s, action %s, expire %Tu, reason: %s",
-+ target, mask,
-+ flags & GLINE_OPERFORCE ? "YES" : "NO",
-+ flags & GLINE_AUTO ? "YES" : "NO",
- action == GLINE_ACTIVATE ? "+" : "-", expire, reason));
-
- return gline_add(cptr, sptr, mask, reason, expire, 0, 0,
-@@ -580,8 +608,9 @@
-
- /* Let's now destroy the G-line */
- Debug((DEBUG_DEBUG, "I am destroying a local G-line here; target %s, "
-- "mask %s, operforce %s, action %s", target, mask,
-+ "mask %s, operforce %s, auto %s, action %s", target, mask,
- flags & GLINE_OPERFORCE ? "YES" : "NO",
-+ flags & GLINE_AUTO ? "YES" : "NO",
- action == GLINE_ACTIVATE ? "+" : "-"));
-
- return gline_destroy(cptr, sptr, agline);
-@@ -615,9 +644,11 @@
- }
+ mask++;
- Debug((DEBUG_DEBUG, "I have a global G-line I am acting upon now; "
-- "target %s, mask %s, operforce %s, action %s, expire %Tu, "
-+ "target %s, mask %s, operforce %s, auto %s, action %s, expire %Tu, "
- "reason: %s; gline %s! (fields present: %s %s)", target,
-- mask, flags & GLINE_OPERFORCE ? "YES" : "NO",
-+ mask,
-+ flags & GLINE_OPERFORCE ? "YES" : "NO",
-+ flags & GLINE_AUTO ? "YES" : "NO",
- action == GLINE_ACTIVATE ? "+" :
- (action == GLINE_DEACTIVATE ? "-" :
- (action == GLINE_LOCAL_ACTIVATE ? ">" :
-diff -r a4507a57b7cd ircd/s_err.c
---- a/ircd/s_err.c Sun Jan 18 21:11:24 2009 +0100
-+++ b/ircd/s_err.c Sun Jan 18 23:19:35 2009 +0100
+diff -r 8dcf56ed67b9 ircd/s_err.c
+--- a/ircd/s_err.c Sun Feb 15 15:31:50 2009 +0100
++++ b/ircd/s_err.c Sun Feb 15 15:59:10 2009 +0100
@@ -526,7 +526,7 @@
/* 246 */
{ RPL_STATSTLINE, "%c %s %s", "246" },