1
0
mirror of https://github.com/anope/anope.git synced 2026-06-28 16:36:39 +02:00

Send replies from fantasy commands back to the channel, this will be expanded on later

This commit is contained in:
Adam
2010-11-24 21:40:56 -06:00
parent 37e02a3594
commit cb6ef574e3
154 changed files with 2428 additions and 2111 deletions
+9 -7
View File
@@ -28,23 +28,25 @@ class CommandCSSet : public Command
this->subcommands.clear();
}
CommandReturn Execute(User *u, const std::vector<Anope::string> &params)
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> &params)
{
User *u = source.u;
if (readonly)
{
u->SendMessage(ChanServ, CHAN_SET_DISABLED);
source.Reply(CHAN_SET_DISABLED);
return MOD_CONT;
}
if (!check_access(u, cs_findchan(params[0]), CA_SET))
{
u->SendMessage(ChanServ, ACCESS_DENIED);
source.Reply(ACCESS_DENIED);
return MOD_CONT;
}
// XXX Remove after 1.9.4 release
if (params[1].equals_ci("MLOCK"))
{
u->SendMessage(ChanServ, CHAN_SET_MLOCK_DEPRECATED, Config->s_ChanServ.c_str());
source.Reply(CHAN_SET_MLOCK_DEPRECATED, Config->s_ChanServ.c_str());
return MOD_CONT;
}
@@ -52,7 +54,7 @@ class CommandCSSet : public Command
if (c)
{
ChannelInfo *ci = cs_findchan(params[0]);
ChannelInfo *ci = source.ci;
Anope::string cmdparams = ci->name;
for (std::vector<Anope::string>::const_iterator it = params.begin() + 2, it_end = params.end(); it != it_end; ++it)
cmdparams += " " + *it;
@@ -60,8 +62,8 @@ class CommandCSSet : public Command
}
else
{
u->SendMessage(ChanServ, NICK_SET_UNKNOWN_OPTION, params[1].c_str());
u->SendMessage(ChanServ, MORE_INFO, Config->s_ChanServ.c_str(), "SET");
source.Reply(NICK_SET_UNKNOWN_OPTION, params[1].c_str());
source.Reply(MORE_INFO, Config->s_ChanServ.c_str(), "SET");
}
return MOD_CONT;