diff options
author | Adam <Adam@anope.org> | 2011-04-22 03:16:11 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-05-16 04:06:17 -0400 |
commit | c8c23158a4ff74822d6c7d201dc53d879e3d91e8 (patch) | |
tree | 4bc9ae029691d5e7c03ebc1481683a010b733844 /modules/core/os_help.cpp | |
parent | 1782ce260c5bc214ec0b2e39257ab1371b68ae9c (diff) |
Moved the core pseudo clients out into their own modules
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); } }; |