1
0
mirror of https://github.com/anope/anope.git synced 2026-07-01 16:46:38 +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
+8 -7
View File
@@ -20,26 +20,27 @@ class CommandOSModUnLoad : public Command
{
}
CommandReturn Execute(User *u, const std::vector<Anope::string> &params)
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> &params)
{
Anope::string mname = params[0];
User *u = source.u;
const Anope::string &mname = params[0];
Module *m = FindModule(mname);
if (!m)
{
u->SendMessage(OperServ, OPER_MODULE_ISNT_LOADED, mname.c_str());
source.Reply(OPER_MODULE_ISNT_LOADED, mname.c_str());
return MOD_CONT;
}
if (!m->handle)
{
u->SendMessage(OperServ, OPER_MODULE_REMOVE_FAIL, m->name.c_str());
source.Reply(OPER_MODULE_REMOVE_FAIL, m->name.c_str());
return MOD_CONT;
}
if (m->GetPermanent() || m->type == PROTOCOL)
{
u->SendMessage(OperServ, OPER_MODULE_NO_UNLOAD);
source.Reply(OPER_MODULE_NO_UNLOAD);
return MOD_CONT;
}
@@ -49,11 +50,11 @@ class CommandOSModUnLoad : public Command
if (status == MOD_ERR_OK)
{
u->SendMessage(OperServ, OPER_MODULE_UNLOADED, mname.c_str());
source.Reply(OPER_MODULE_UNLOADED, mname.c_str());
ircdproto->SendGlobops(OperServ, "%s unloaded module %s", u->nick.c_str(), mname.c_str());
}
else
u->SendMessage(OperServ, OPER_MODULE_REMOVE_FAIL, mname.c_str());
source.Reply(OPER_MODULE_REMOVE_FAIL, mname.c_str());
return MOD_CONT;
}