diff options
Diffstat (limited to 'modules/core/cs_set_secure.cpp')
-rw-r--r-- | modules/core/cs_set_secure.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/modules/core/cs_set_secure.cpp b/modules/core/cs_set_secure.cpp index 8fa6c533e..ac8aea3d1 100644 --- a/modules/core/cs_set_secure.cpp +++ b/modules/core/cs_set_secure.cpp @@ -22,7 +22,6 @@ class CommandCSSetSecure : 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 CommandCSSetSecure"); @@ -38,25 +37,25 @@ class CommandCSSetSecure : public Command source.Reply(CHAN_SET_SECURE_OFF, ci->name.c_str()); } else - this->OnSyntaxError(u, "SECURE"); + this->OnSyntaxError(source, "SECURE"); return MOD_CONT; } - bool OnHelp(User *u, const Anope::string &) + bool OnHelp(CommandSource &source, const Anope::string &) { - u->SendMessage(ChanServ, CHAN_HELP_SET_SECURE, "SET", Config->s_NickServ.c_str()); + source.Reply(CHAN_HELP_SET_SECURE, "SET", Config->s_NickServ.c_str()); return true; } - void OnSyntaxError(User *u, const Anope::string &) + void OnSyntaxError(CommandSource &source, const Anope::string &) { - SyntaxError(ChanServ, u, "SET SECURE", CHAN_SET_SECURE_SYNTAX); + SyntaxError(source, "SET SECURE", CHAN_SET_SECURE_SYNTAX); } - void OnServHelp(User *u) + void OnServHelp(CommandSource &source) { - u->SendMessage(ChanServ, CHAN_HELP_CMD_SET_SECURE); + source.Reply(CHAN_HELP_CMD_SET_SECURE); } }; @@ -67,15 +66,15 @@ class CommandCSSASetSecure : public CommandCSSetSecure { } - bool OnHelp(User *u, const Anope::string &) + bool OnHelp(CommandSource &source, const Anope::string &) { - u->SendMessage(ChanServ, CHAN_HELP_SET_SECURE, "SASET", Config->s_NickServ.c_str()); + source.Reply(CHAN_HELP_SET_SECURE, "SASET", Config->s_NickServ.c_str()); return true; } - void OnSyntaxError(User *u, const Anope::string &) + void OnSyntaxError(CommandSource &source, const Anope::string &) { - SyntaxError(ChanServ, u, "SASET SECURE", CHAN_SASET_SECURE_SYNTAX); + SyntaxError(source, "SASET SECURE", CHAN_SASET_SECURE_SYNTAX); } }; |