summaryrefslogtreecommitdiff
path: root/modules/core/ns_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/ns_help.cpp
parent1782ce260c5bc214ec0b2e39257ab1371b68ae9c (diff)
Moved the core pseudo clients out into their own modules
Diffstat (limited to 'modules/core/ns_help.cpp')
-rw-r--r--modules/core/ns_help.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/modules/core/ns_help.cpp b/modules/core/ns_help.cpp
index d586901f8..61088d979 100644
--- a/modules/core/ns_help.cpp
+++ b/modules/core/ns_help.cpp
@@ -12,6 +12,7 @@
/*************************************************************************/
#include "module.h"
+#include "nickserv.h"
class CommandNSHelp : public Command
{
@@ -24,7 +25,7 @@ class CommandNSHelp : public Command
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> &params)
{
- mod_help_cmd(NickServ, source.u, NULL, params[0]);
+ mod_help_cmd(nickserv->Bot(), source.u, NULL, params[0]);
return MOD_CONT;
}
@@ -36,9 +37,8 @@ class CommandNSHelp : public Command
"commands allow for registration and maintenance of\n"
"nicknames; to use them, type \002%s%s \037command\037\002.\n"
"For more information on a specific command, type\n"
- "\002%s%s HELP \037command\037\002."), Config->UseStrictPrivMsgString.c_str(), NickServ->nick.c_str(), Config->UseStrictPrivMsgString.c_str(), NickServ->nick.c_str(),
- NickServ->nick.c_str());
- for (CommandMap::const_iterator it = NickServ->Commands.begin(), it_end = NickServ->Commands.end(); it != it_end; ++it)
+ "\002%s%s HELP \037command\037\002."), Config->UseStrictPrivMsgString.c_str(), Config->s_NickServ.c_str(), Config->UseStrictPrivMsgString.c_str(), Config->s_NickServ.c_str(), Config->s_NickServ.c_str());
+ for (CommandMap::const_iterator it = nickserv->Bot()->Commands.begin(), it_end = nickserv->Bot()->Commands.end(); it != it_end; ++it)
if (!Config->HidePrivilegedCommands || it->second->permission.empty() || u->HasCommand(it->second->permission))
it->second->OnServHelp(source);
if (u->IsServicesOper())
@@ -46,7 +46,7 @@ class CommandNSHelp : public Command
"Services Operators can also drop any nickname without needing\n"
"to identify for the nick, and may view the access list for\n"
"any nickname (\002%s%s ACCESS LIST \037nick\037\002)."),
- Config->UseStrictPrivMsgString.c_str(), NickServ->nick.c_str());
+ Config->UseStrictPrivMsgString.c_str(), Config->s_NickServ.c_str());
if (Config->NSExpire >= 86400)
source.Reply(_("Nicknames that are not used anymore are subject to \n"
"the automatic expiration, i.e. they will be deleted\n"
@@ -57,7 +57,7 @@ class CommandNSHelp : public Command
"It is \002NOT\002 intended to facilitate \"stealing\" of\n"
"nicknames or other malicious actions. Abuse of %s\n"
"will result in, at minimum, loss of the abused\n"
- "nickname(s)."), NickServ->nick.c_str());
+ "nickname(s)."), Config->s_NickServ.c_str());
}
};
@@ -71,7 +71,10 @@ class NSHelp : public Module
this->SetAuthor("Anope");
this->SetType(CORE);
- this->AddCommand(NickServ, &commandnshelp);
+ if (!nickserv)
+ throw ModuleException("NickServ is not loaded!");
+
+ this->AddCommand(nickserv->Bot(), &commandnshelp);
}
};