summaryrefslogtreecommitdiff
path: root/modules/core/bs_help.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-04-22 03:16:11 -0400
committerAdam <Adam@anope.org>2011-05-16 04:06:17 -0400
commitc8c23158a4ff74822d6c7d201dc53d879e3d91e8 (patch)
tree4bc9ae029691d5e7c03ebc1481683a010b733844 /modules/core/bs_help.cpp
parent1782ce260c5bc214ec0b2e39257ab1371b68ae9c (diff)
Moved the core pseudo clients out into their own modules
Diffstat (limited to 'modules/core/bs_help.cpp')
-rw-r--r--modules/core/bs_help.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/modules/core/bs_help.cpp b/modules/core/bs_help.cpp
index c2632b437..eafa5b44e 100644
--- a/modules/core/bs_help.cpp
+++ b/modules/core/bs_help.cpp
@@ -12,6 +12,7 @@
/*************************************************************************/
#include "module.h"
+#include "botserv.h"
class CommandBSHelp : public Command
{
@@ -25,7 +26,7 @@ class CommandBSHelp : public Command
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> &params)
{
- mod_help_cmd(BotServ, source.u, NULL, params[0]);
+ mod_help_cmd(botserv->Bot(), source.u, NULL, params[0]);
return MOD_CONT;
}
@@ -40,9 +41,9 @@ class CommandBSHelp : public Command
"below; to use them, type \002%s%s \037command\037\002. For\n"
"more information on a specific command, type\n"
"\002%s%s HELP \037command\037\002."),
- BotServ->nick.c_str(), Config->UseStrictPrivMsgString.c_str(), BotServ->nick.c_str(),
- Config->UseStrictPrivMsgString.c_str(), BotServ->nick.c_str());
- for (CommandMap::const_iterator it = BotServ->Commands.begin(), it_end = BotServ->Commands.end(); it != it_end; ++it)
+ Config->s_BotServ.c_str(), Config->UseStrictPrivMsgString.c_str(), Config->s_BotServ.c_str(),
+ Config->UseStrictPrivMsgString.c_str(), Config->s_BotServ.c_str());
+ for (CommandMap::const_iterator it = botserv->Bot()->Commands.begin(), it_end = botserv->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(_("Bot will join a channel whenever there is at least\n"
@@ -62,7 +63,10 @@ class BSHelp : public Module
this->SetAuthor("Anope");
this->SetType(CORE);
- this->AddCommand(BotServ, &commandbshelp);
+ if (!botserv)
+ throw ModuleException("BotServ is not loaded!");
+
+ this->AddCommand(botserv->Bot(), &commandbshelp);
}
};