X-Git-Url: https://jfr.im/git/irc/quakenet/newserv.git/blobdiff_plain/1482fb7839d1e0ee7491f333dde9c8b8a8d3d489..8c684fca9c7dbb4a2601628c744be9236ee68641:/chanserv/chancmds/op.c diff --git a/chanserv/chancmds/op.c b/chanserv/chancmds/op.c index 365f948f..b4a9cc37 100644 --- a/chanserv/chancmds/op.c +++ b/chanserv/chancmds/op.c @@ -7,7 +7,7 @@ * CMDDESC: Ops you or other users on channel(s). * CMDFUNC: csc_doop * CMDPROTO: int csc_doop(void *source, int cargc, char **cargv); - * CMDHELP: Usage: OP [ [ [ [...]]] + * CMDHELP: Usage: OP [ [ [ [...]]]] * CMDHELP: Ops you on one or more channels, or ops other named users on a given channel. * CMDHELP: This command cannot be used to op users who are otherwise prevented from getting * CMDHELP: ops, e.g. via the +d chanlev flag (see CHANLEV) or bitch mode (see CHANFLAGS). @@ -81,6 +81,12 @@ int csc_doop(void *source, int cargc, char **cargv) { return CMD_ERROR; rcp=cip->exts[chanservext]; + + /* If the channel doesn't currently exist, forget it. */ + if (!cip->channel) { + chanservstdmessage(sender, QM_EMPTYCHAN, cip->name->content); + return CMD_ERROR; + } if (cargc==1) { /* Only one arg: "op me" */ @@ -137,7 +143,7 @@ int csc_doop(void *source, int cargc, char **cargv) { } if (donotice && bufpos) { - sendopnoticetochannel(chanservnick, cip->channel, "%s opped %s", sender, buf); + sendopnoticetochannel(chanservnick, cip->channel, "%s opped %s", sender->nick, buf); } localsetmodeflush(&changes, 1);