1
0
mirror of https://github.com/anope/anope.git synced 2026-07-09 08:23:13 +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
+6 -5
View File
@@ -20,10 +20,11 @@ class CommandOSNOOP : public Command
{
}
CommandReturn Execute(User *u, const std::vector<Anope::string> &params)
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> &params)
{
Anope::string cmd = params[0];
Anope::string server = params[1];
User *u = source.u;
const Anope::string &cmd = params[0];
const Anope::string &server = params[1];
if (cmd.equals_ci("SET"))
{
@@ -35,7 +36,7 @@ class CommandOSNOOP : public Command
reason = "NOOP command used by " + u->nick;
if (Config->WallOSNoOp)
ircdproto->SendGlobops(OperServ, "\2%s\2 used NOOP on \2%s\2", u->nick.c_str(), server.c_str());
u->SendMessage(OperServ, OPER_NOOP_SET, server.c_str());
source.Reply(OPER_NOOP_SET, server.c_str());
/* Kill all the IRCops of the server */
for (patricia_tree<User *>::const_iterator it = UserListByNick.begin(), it_end = UserListByNick.end(); it != it_end; ++it)
@@ -50,7 +51,7 @@ class CommandOSNOOP : public Command
else if (cmd.equals_ci("REVOKE"))
{
ircdproto->SendSVSNOOP(server, 0);
u->SendMessage(OperServ, OPER_NOOP_REVOKE, server.c_str());
source.Reply(OPER_NOOP_REVOKE, server.c_str());
}
else
this->OnSyntaxError(u, "");