diff options
author | Adam <Adam@anope.org> | 2010-11-24 21:40:56 -0600 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-12-12 19:36:19 -0500 |
commit | cb6ef574e3df5cc846247450b74ca37d265f319e (patch) | |
tree | 8ce3374a537c312af63c78125bfea4622bb188f0 /modules/extra/cs_tban.cpp | |
parent | 37e02a3594fdddc3d5a3df0501c528f42db6c4da (diff) |
Send replies from fantasy commands back to the channel, this will be expanded on later
Diffstat (limited to 'modules/extra/cs_tban.cpp')
-rw-r--r-- | modules/extra/cs_tban.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/modules/extra/cs_tban.cpp b/modules/extra/cs_tban.cpp index 444681262..a037c8243 100644 --- a/modules/extra/cs_tban.cpp +++ b/modules/extra/cs_tban.cpp @@ -58,23 +58,25 @@ class CommandCSTBan : public Command { } - CommandReturn Execute(User *u, const std::vector<Anope::string> ¶ms) + CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) { - Anope::string mask; - Channel *c; - User *u2 = NULL; + User *u = source.u; + ChannelInfo *ci = source.ci; + Channel *c = ci->c; - Anope::string chan = params[0]; - Anope::string nick = params[1]; - Anope::string time = params[2]; + const Anope::string &chan = params[0]; + const Anope::string &nick = params[1]; + const Anope::string &time = params[2]; - if (!(c = findchan(chan))) + User *u2; + if (!c) u->SendMessage(ChanServ, CHAN_X_NOT_IN_USE, chan.c_str()); else if (!(u2 = finduser(nick))) u->SendMessage(ChanServ, NICK_X_NOT_IN_USE, nick.c_str()); else if (CanBanUser(c, u, u2)) { + Anope::string mask; get_idealban(c->ci, u2, mask); c->SetMode(NULL, CMODE_BAN, mask); new TempBan(dotime(time), c, mask); |