summaryrefslogtreecommitdiff
path: root/modules/core/cs_drop.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-11-24 21:40:56 -0600
committerAdam <Adam@anope.org>2010-12-12 19:36:19 -0500
commitcb6ef574e3df5cc846247450b74ca37d265f319e (patch)
tree8ce3374a537c312af63c78125bfea4622bb188f0 /modules/core/cs_drop.cpp
parent37e02a3594fdddc3d5a3df0501c528f42db6c4da (diff)
Send replies from fantasy commands back to the channel, this will be expanded on later
Diffstat (limited to 'modules/core/cs_drop.cpp')
-rw-r--r--modules/core/cs_drop.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/modules/core/cs_drop.cpp b/modules/core/cs_drop.cpp
index 64d6ed1c7..453f819fe 100644
--- a/modules/core/cs_drop.cpp
+++ b/modules/core/cs_drop.cpp
@@ -22,14 +22,16 @@ class CommandCSDrop : public Command
this->SetFlag(CFLAG_ALLOW_SUSPENDED);
}
- CommandReturn Execute(User *u, const std::vector<Anope::string> &params)
+ CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> &params)
{
- Anope::string chan = params[0];
- ChannelInfo *ci;
+ const Anope::string &chan = params[0];
+
+ User *u = source.u;
+ ChannelInfo *ci = source.ci;
if (readonly)
{
- u->SendMessage(ChanServ, CHAN_DROP_DISABLED); // XXX: READ_ONLY_MODE?
+ source.Reply(CHAN_DROP_DISABLED); // XXX: READ_ONLY_MODE?
return MOD_CONT;
}
@@ -37,19 +39,19 @@ class CommandCSDrop : public Command
if (ci->HasFlag(CI_FORBIDDEN) && !u->Account()->HasCommand("chanserv/drop"))
{
- u->SendMessage(ChanServ, CHAN_X_FORBIDDEN, chan.c_str());
+ source.Reply(CHAN_X_FORBIDDEN, chan.c_str());
return MOD_CONT;
}
if (ci->HasFlag(CI_SUSPENDED) && !u->Account()->HasCommand("chanserv/drop"))
{
- u->SendMessage(ChanServ, CHAN_X_FORBIDDEN, chan.c_str());
+ source.Reply(CHAN_X_FORBIDDEN, chan.c_str());
return MOD_CONT;
}
if ((ci->HasFlag(CI_SECUREFOUNDER) ? !IsFounder(u, ci) : !check_access(u, ci, CA_FOUNDER)) && !u->Account()->HasCommand("chanserv/drop"))
{
- u->SendMessage(ChanServ, ACCESS_DENIED);
+ source.Reply(ACCESS_DENIED);
return MOD_CONT;
}