diff options
Diffstat (limited to 'modules/core/os_help.cpp')
-rw-r--r-- | modules/core/os_help.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/modules/core/os_help.cpp b/modules/core/os_help.cpp index b64a614b9..3694ad3ff 100644 --- a/modules/core/os_help.cpp +++ b/modules/core/os_help.cpp @@ -12,6 +12,7 @@ /*************************************************************************/ #include "module.h" +#include "operserv.h" class CommandOSHelp : public Command { @@ -23,18 +24,18 @@ class CommandOSHelp : public Command CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) { - mod_help_cmd(OperServ, source.u, NULL, params[0]); + mod_help_cmd(operserv->Bot(), source.u, NULL, params[0]); return MOD_CONT; } void OnSyntaxError(CommandSource &source, const Anope::string &subcommand) { User *u = source.u; - source.Reply(_("%s commands:"), OperServ->nick.c_str()); - for (CommandMap::const_iterator it = OperServ->Commands.begin(), it_end = OperServ->Commands.end(); it != it_end; ++it) + source.Reply(_("%s commands:"), Config->s_OperServ.c_str()); + for (CommandMap::const_iterator it = operserv->Bot()->Commands.begin(), it_end = operserv->Bot()->Commands.end(); it != it_end; ++it) if (!Config->HidePrivilegedCommands || it->second->permission.empty() || u->HasCommand(it->second->permission)) it->second->OnServHelp(source); - source.Reply(_("\002Notice:\002 All commands sent to %s are logged!"), OperServ->nick.c_str()); + source.Reply(_("\002Notice:\002 All commands sent to %s are logged!"), Config->s_OperServ.c_str()); } }; @@ -48,7 +49,10 @@ class OSHelp : public Module this->SetAuthor("Anope"); this->SetType(CORE); - this->AddCommand(OperServ, &commandoshelp); + if (!operserv) + throw ModuleException("OperServ is not loaded!"); + + this->AddCommand(operserv->Bot(), &commandoshelp); } }; |