return;
}
+#if SNIRCD_VERSION >= 140
+#error TODO: implement 6 parameter glines for snircd >=1.4.0
+#endif /* SNIRCD_VERSION */
+
if (agline->flags & GLINE_DESTROYED) {
+#if SNIRCD_VERSION < 135
+ controlwall(NO_OPER, NL_GLINES, "Tried to destroy G-Line on '%s' however SNIRCD_VERSION is too old.", glinetostring(agline));
+#else
controlwall(NO_OPER, NL_GLINES, "Destroying G-Line on '%s' lasting %s with reason '%s', created by: %s",
glinetostring(agline), longtoduration(agline->expire-getnettime(), 0),
agline->reason->content, agline->creator->content);
glinetostring(agline), agline->expire - getnettime(),
agline->lastmod, agline->reason->content);
#endif
+#endif /* SNIRCD_VERSION */
} else if (agline->flags & GLINE_ACTIVE) {
controlwall(NO_OPER, NL_GLINES, "Activating G-Line on '%s' lasting %s created by %s with reason '%s'",
glinetostring(agline), longtoduration(agline->expire-getnettime(), 0),
else if (!(gl->flags & GLINE_ACTIVE) && sgl->flags & GLINE_ACTIVE)
gline_deactivate(sgl, 0, 0);
+#if SNIRCD_VERSION >= 140
+ sgl->expire = gl->expire;
+
+ if (gl->lifetime > sgl->lifetime)
+ sgl->lifetime = gl->lifetime;
+
+ freesstring(sgl->reason);
+ sgl->reason = getsstring(gl->reason, 512);
+#endif
+
freegline(gl);
gl = sgl;
} else {
glinebuf gbuf;
#if SNIRCD_VERSION < 140
gline *gl;
-#endif
+#endif /* SNIRCD_VERSION */
if (cargc < 1)
return CMD_USAGE;
controlreply(sender, "Reactivating existing gline on %s", mask);
}
-#endif
+#endif /* SNIRCD_VERSION */
if (sender->auth)
snprintf(creator, sizeof(creator), "#%s", sender->authname);