From 1cfb630ede33a1f1206b53f9e703037f7fb9a086 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 20 Oct 2011 11:54:56 -0400 Subject: Fixed a crash in clearusers --- modules/commands/cs_clearusers.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'modules/commands/cs_clearusers.cpp') 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); -- cgit