summaryrefslogtreecommitdiff
path: root/modules/commands/cs_clearusers.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-10-20 11:54:56 -0400
committerAdam <Adam@anope.org>2011-10-20 11:54:56 -0400
commit1cfb630ede33a1f1206b53f9e703037f7fb9a086 (patch)
tree49cfe1ba412a887c1b2d6bb934cde4d3e7f88185 /modules/commands/cs_clearusers.cpp
parentd16f9620d51ede5ae1211df9d1423d87a41748a1 (diff)
Fixed a crash in clearusers
Diffstat (limited to 'modules/commands/cs_clearusers.cpp')
-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);