#define DELAYED_HOST_GLINE 5
#define DELAYED_KILL 6
-MODULE_VERSION("1.43");
+#define RESERVED_NICK_GLINE_DURATION 3600 /* 1h */
+
+MODULE_VERSION("1.44");
typedef struct rg_glinenode {
nick *np;
static unsigned int getrgmarker(void);
+#define RESERVED_NICK_CLASS "reservednick"
/* shadowserver only reports classes[0] */
-static const char *classes[] = { "drone", "proxy", "spam", "fakeauth", "other", (char *)0 };
+static const char *classes[] = { "drone", "proxy", "spam", "other", RESERVED_NICK_CLASS, (char *)0 };
void _init(void) {
sstring *max_casualties, *max_spew, *expiry_time, *max_per_gline;
"3 - Instant KILL (ik)\n"
"4 - Delayed USER@IP GLINE (dgu)\n"
"5 - Delayed *@IP GLINE (dgh)\n"
- "6 - Delayed KILL (dk)",
+ "6 - Delayed KILL (dk)\n"
+ "Note that some classes may have additional side effects (e.g. 'reservednick' also sets nick style glines).",
allclasses);
registercontrolhelpcmd("regexgline", NO_OPER, 5, &rg_gline, helpbuf);
snprintf(hostname, sizeof(hostname), "%s@%s", np->ident, IPtostr(np->p_ipaddr));
}
+ 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);
+
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)) {
struct rg_glinenode *nn = (struct rg_glinenode *)malloc(sizeof(struct rg_glinenode));