summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/commands/cs_clearusers.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/commands/cs_clearusers.cpp b/modules/commands/cs_clearusers.cpp
index b89a68e6e..1d1fb7356 100644
--- a/modules/commands/cs_clearusers.cpp
+++ b/modules/commands/cs_clearusers.cpp
@@ -31,9 +31,15 @@ class CommandCSClearUsers : public Command
Anope::string modebuf;
if (!c)
+ {
source.Reply(CHAN_X_NOT_IN_USE, chan.c_str());
+ return;
+ }
else if (!c->ci)
+ {
source.Reply(CHAN_X_NOT_REGISTERED, c->name.c_str());
+ return;
+ }
else if (!c->ci->AccessFor(u).HasPriv("FOUNDER"))
{
source.Reply(ACCESS_DENIED);