diff options
Diffstat (limited to 'modules/core/cs_clearusers.cpp')
-rw-r--r-- | modules/core/cs_clearusers.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/modules/core/cs_clearusers.cpp b/modules/core/cs_clearusers.cpp index 028c7e5d6..316513200 100644 --- a/modules/core/cs_clearusers.cpp +++ b/modules/core/cs_clearusers.cpp @@ -20,20 +20,22 @@ class CommandCSClearUsers : public Command { } - CommandReturn Execute(User *u, const std::vector<Anope::string> ¶ms) + CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) { - Anope::string chan = params[0]; - Anope::string what = params[1]; - Channel *c = findchan(chan); - ChannelInfo *ci = c ? c->ci : NULL; + const Anope::string &chan = params[0]; + + User *u = source.u; + ChannelInfo *ci = source.ci; + Channel *c = ci->c; + Anope::string modebuf; if (!c) - u->SendMessage(ChanServ, CHAN_X_NOT_IN_USE, chan.c_str()); + source.Reply(CHAN_X_NOT_IN_USE, chan.c_str()); else if (!check_access(u, ci, CA_FOUNDER)) - u->SendMessage(ChanServ, ACCESS_DENIED); + source.Reply(ACCESS_DENIED); - Anope::string buf = "CLEAR USERS command from " + u->nick + " (" + u->Account()->display + ")"; + Anope::string buf = "CLEARUSERS command from " + u->nick + " (" + u->Account()->display + ")"; for (CUserList::iterator it = c->users.begin(), it_end = c->users.end(); it != it_end; ) { |