From: Ian Barker Date: Wed, 30 May 2007 10:21:50 +0000 (+0100) Subject: changed gline function to gline *@ip for <= NSMAX_GLINE_CLONES (set to 5), else gline... X-Git-Url: https://jfr.im/git/irc/quakenet/newserv.git/commitdiff_plain/22f7c5c6b6b4fd6d3c4dcdf54317b9eb7af10cb0 changed gline function to gline *@ip for <= NSMAX_GLINE_CLONES (set to 5), else gline user@ip - fix to not twat trusted hosts. --- diff --git a/newsearch/newsearch.h b/newsearch/newsearch.h index ccda7ced..12069933 100644 --- a/newsearch/newsearch.h +++ b/newsearch/newsearch.h @@ -8,6 +8,9 @@ #define NSMAX_GLINE_LIMIT 500 +#define NSMAX_GLINE_CLONES 5 + + /* gline duration, in seconds */ #define NSGLINE_DURATION 3600 diff --git a/newsearch/ns-gline.c b/newsearch/ns-gline.c index 4c2ba5e6..4e22423d 100644 --- a/newsearch/ns-gline.c +++ b/newsearch/ns-gline.c @@ -99,7 +99,7 @@ void gline_free(struct searchNode *thenode) { nnp = np->next; if (np->marker == localdata->marker) { if (!IsOper(np) && !IsService(np) && !IsXOper(np)) { - if (np->ident[0] == '~') + if (np->host->clonecount <= NSMAX_GLINE_CLONES) irc_send("%s GL * +*@%s %u :You (%s!%s@%s) have been glined for violating our terms of service.", mynumeric->content, IPtostr(np->ipaddress), localdata->duration, np->nick, np->ident, IPtostr(np->ipaddress)); else