}
void glinesetmask(const char *mask, int duration, const char *reason) {
+ controlwall(NO_OPER, NL_GLINES, "Would set gline on '%s' lasting %s with reason '%s'. CURRENTLY DISABLED FOR TESTING PURPOSES.", mask, longtoduration(duration, 0), reason);
+
+#if 0
irc_send("%s GL * +%s %d %jd :%s", mynumeric->content, mask, duration, (intmax_t)getnettime(), reason);
+#endif
}
void glineremovemask(const char *mask, int duration, const char *reason) {
+ controlwall(NO_OPER, NL_GLINES, "Would remove gline on '%s'. CURRENTLY DISABLED FOR TESTING PURPOSES.", mask);
+
+#if 0
irc_send("%s GL * -%s %d %jd :%s", mynumeric->content, mask, duration, (intmax_t)getnettime(), reason);
+#endif
}
static void glinesetmask_cb(const char *mask, int hits, void *arg) {
- controlwall(NO_OPER, NL_GLINES, "Would set gline on '%s' (hits: %d). CURRENTLY DISABLED FOR TESTING PURPOSES.", mask, hits);
+ gline_params *gp = arg;
+
+ controlwall(NO_OPER, NL_GLINES, "Would set gline on '%s' lasting %s with reason '%s' (hits: %d). CURRENTLY DISABLED FOR TESTING PURPOSES.", mask, longtoduration(gp->duration, 0), gp->reason, hits);
-/* gline_params *gp = arg;
- glinesetmask(mask, gp->duration, gp->reason);*/
+#if 0
+ glinesetmask(mask, gp->duration, gp->reason);
+#endif
}
int glinesuggestbyip(const char *user, struct irc_in_addr *ip, unsigned char bits, int flags, gline_callback callback, void *uarg) {
glineflags = GLINE_ALWAYS_USER;
}
- if(!strcmp(rp->class, RESERVED_NICK_CLASS))
- irc_send("%s GL * +%s!*@* %d %jd :AUTO: %s (ID: %08lx)\r\n", mynumeric->content, np->nick, RESERVED_NICK_GLINE_DURATION, (intmax_t)time(NULL), rp->reason->content, rp->glineid);
+ if(!strcmp(rp->class, RESERVED_NICK_CLASS)) {
+ char mask[512], reason[512];
+ snprintf(mask, sizeof(mask), "%s!*@*", np->nick);
+ snprintf(reason, sizeof(reason), "AUTO %s (ID: %08lx)", rp->reason->content, rp->glineid);
+ glinesetmask(mask, RESERVED_NICK_GLINE_DURATION, reason);
+ }
validdelay = (rp->type == INSTANT_KILL) || (rp->type == DELAYED_IDENT_GLINE) || (rp->type == DELAYED_HOST_GLINE) || (rp->type == DELAYED_KILL);
if (validdelay || (usercount > rg_max_per_gline)) {
}
*/
if((tg->flags & TRUST_ENFORCE_IDENT) && (np->ident[0] == '~')) {
- controlwall(NO_OPER, NL_TRUSTS, "Ident required: '%s' %s!%s@%s - %senforced.", tg->name->content, np->nick, np->ident, np->host->name->content, , enforcepolicy?"":"not ");
+ controlwall(NO_OPER, NL_TRUSTS, "Ident required: '%s' %s!%s@%s - %senforced.", tg->name->content, np->nick, np->ident, np->host->name->content, enforcepolicy?"":"not ");
if (enforcepolicy)
glinebynick(np, POLICY_GLINE_DURATION, "IDENTD required from your host.", GLINE_ALWAYS_USER|GLINE_IGNORE_TRUST);