summaryrefslogtreecommitdiff
path: root/src/core/cs_xop.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/cs_xop.c')
-rw-r--r--src/core/cs_xop.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/cs_xop.c b/src/core/cs_xop.c
index 2a73ce3f6..60772b0f3 100644
--- a/src/core/cs_xop.c
+++ b/src/core/cs_xop.c
@@ -360,11 +360,9 @@ class XOPBase : public Command
const char *chan = params[0].c_str();
const char *cmd = params[1].c_str();
- ChannelInfo *ci;
+ ChannelInfo *ci = cs_findchan(chan);
- if (!(ci = cs_findchan(chan)))
- notice_lang(s_ChanServ, u, CHAN_X_NOT_REGISTERED, chan);
- else if (!(ci->flags & CI_XOP))
+ if (!(ci->flags & CI_XOP))
notice_lang(s_ChanServ, u, CHAN_XOP_ACCESS, s_ChanServ);
else if (!stricmp(cmd, "ADD"))
return this->DoAdd(u, params, ci, level, messages);