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/ms_help.cpp | |
parent | 1782ce260c5bc214ec0b2e39257ab1371b68ae9c (diff) |
Moved the core pseudo clients out into their own modules
Diffstat (limited to 'modules/core/ms_help.cpp')
-rw-r--r-- | modules/core/ms_help.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/modules/core/ms_help.cpp b/modules/core/ms_help.cpp index b672e06bf..dcd5f4e03 100644 --- a/modules/core/ms_help.cpp +++ b/modules/core/ms_help.cpp @@ -12,6 +12,7 @@ /*************************************************************************/ #include "module.h" +#include "memoserv.h" class CommandMSHelp : public Command { @@ -24,7 +25,7 @@ class CommandMSHelp : public Command CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) { - mod_help_cmd(MemoServ, source.u, NULL, params[0]); + mod_help_cmd(memoserv->Bot(), source.u, NULL, params[0]); return MOD_CONT; } @@ -36,15 +37,15 @@ class CommandMSHelp : public Command "the time or not, or to channels(*). Both the sender's\n" "nickname and the target nickname or channel must be\n" "registered in order to send a memo.\n" - "%s's commands include:"), MemoServ->nick.c_str(), MemoServ->nick.c_str()); - for (CommandMap::const_iterator it = MemoServ->Commands.begin(), it_end = MemoServ->Commands.end(); it != it_end; ++it) + "%s's commands include:"), Config->s_MemoServ.c_str(), Config->s_MemoServ.c_str()); + for (CommandMap::const_iterator it = memoserv->Bot()->Commands.begin(), it_end = memoserv->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(_("Type \002%s%s HELP \037command\037\002 for help on any of the\n" "above commands.\n" "(*) By default, any user with at least level 10 access on a\n" " channel can read that channel's memos. This can be\n" - " changed with the %s \002LEVELS\002 command."), Config->UseStrictPrivMsgString.c_str(), MemoServ->nick.c_str(), Config->s_ChanServ.c_str()); + " changed with the %s \002LEVELS\002 command."), Config->UseStrictPrivMsgString.c_str(), Config->s_MemoServ.c_str(), Config->s_ChanServ.c_str()); } }; @@ -58,7 +59,10 @@ class MSHelp : public Module this->SetAuthor("Anope"); this->SetType(CORE); - this->AddCommand(MemoServ, &commandmshelp); + if (!memoserv) + throw ModuleException("MemoServ is not loaded!"); + + this->AddCommand(memoserv->Bot(), &commandmshelp); } }; |