diff options
Diffstat (limited to 'modules/core/cs_set_opnotice.cpp')
-rw-r--r-- | modules/core/cs_set_opnotice.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/modules/core/cs_set_opnotice.cpp b/modules/core/cs_set_opnotice.cpp index e02c0d8d9..9a323cb17 100644 --- a/modules/core/cs_set_opnotice.cpp +++ b/modules/core/cs_set_opnotice.cpp @@ -22,7 +22,6 @@ class CommandCSSetOpNotice : public Command CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) { - User *u = source.u; ChannelInfo *ci = source.ci; if (!ci) throw CoreException("NULL ci in CommandCSSetOpNotice"); @@ -38,25 +37,25 @@ class CommandCSSetOpNotice : public Command source.Reply(CHAN_SET_OPNOTICE_OFF, ci->name.c_str()); } else - this->OnSyntaxError(u, "OPNOTICE"); + this->OnSyntaxError(source, "OPNOTICE"); return MOD_CONT; } - bool OnHelp(User *u, const Anope::string &) + bool OnHelp(CommandSource &source, const Anope::string &) { - u->SendMessage(ChanServ, CHAN_HELP_SET_OPNOTICE, "SET"); + source.Reply(CHAN_HELP_SET_OPNOTICE, "SET"); return true; } - void OnSyntaxError(User *u, const Anope::string &) + void OnSyntaxError(CommandSource &source, const Anope::string &) { - SyntaxError(ChanServ, u, "SET OPNOTICE", CHAN_SET_OPNOTICE_SYNTAX); + SyntaxError(source, "SET OPNOTICE", CHAN_SET_OPNOTICE_SYNTAX); } - void OnServHelp(User *u) + void OnServHelp(CommandSource &source) { - u->SendMessage(ChanServ, CHAN_HELP_CMD_SET_OPNOTICE); + source.Reply(CHAN_HELP_CMD_SET_OPNOTICE); } }; @@ -67,15 +66,15 @@ class CommandCSSASetOpNotice : public CommandCSSetOpNotice { } - bool OnHelp(User *u, const Anope::string &) + bool OnHelp(CommandSource &source, const Anope::string &) { - u->SendMessage(ChanServ, CHAN_HELP_SET_OPNOTICE, "SASET"); + source.Reply(CHAN_HELP_SET_OPNOTICE, "SASET"); return true; } - void OnSyntaxError(User *u, const Anope::string &) + void OnSyntaxError(CommandSource &source, const Anope::string &) { - SyntaxError(ChanServ, u, "SET OPNOTICE", CHAN_SASET_OPNOTICE_SYNTAX); + SyntaxError(source, "SET OPNOTICE", CHAN_SASET_OPNOTICE_SYNTAX); } }; |