From: Gunnar Beutner Date: Tue, 6 Aug 2013 20:44:50 +0000 (+0200) Subject: glines: block command shouldn't gline opers. X-Git-Url: https://jfr.im/git/irc/quakenet/newserv.git/commitdiff_plain/c0f108e2931d8e5658940a8d0af355c5cd524400 glines: block command shouldn't gline opers. --- diff --git a/glines/glines_commands.c b/glines/glines_commands.c index 1148b5a6..72b727e7 100644 --- a/glines/glines_commands.c +++ b/glines/glines_commands.c @@ -108,6 +108,13 @@ static int glines_cmdblock(void *source, int cargc, char **cargv) { ownww = 1; } + wnp = &ww->nick; + + if (IsService(wnp) || IsOper(wnp) || NickOnServiceServer(wnp)) { + controlreply(sender, "Target user is an oper or a service. Not setting G-Lines."); + return CMD_ERROR; + } + rejoinline(cargv[coff + 2], cargc - coff - 2); reason = cargv[coff + 2]; @@ -141,7 +148,6 @@ static int glines_cmdblock(void *source, int cargc, char **cargv) { glinebufcounthits(&gbuf, &hits, NULL); id = glinebufcommit(&gbuf, 1); - wnp = &ww->nick; controlwall(NO_OPER, NL_GLINES, "%s BLOCK'ed user '%s!%s@%s' for %s with reason '%s' (%d hits)", controlid(sender), wnp->nick, wnp->ident, wnp->host->name->content, longtoduration(duration, 0), reason, hits);