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/ns_set_kill.cpp | |
parent | 1782ce260c5bc214ec0b2e39257ab1371b68ae9c (diff) |
Moved the core pseudo clients out into their own modules
Diffstat (limited to 'modules/core/ns_set_kill.cpp')
-rw-r--r-- | modules/core/ns_set_kill.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/modules/core/ns_set_kill.cpp b/modules/core/ns_set_kill.cpp index c09228992..6b3952f37 100644 --- a/modules/core/ns_set_kill.cpp +++ b/modules/core/ns_set_kill.cpp @@ -12,6 +12,7 @@ /*************************************************************************/ #include "module.h" +#include "nickserv.h" class CommandNSSetKill : public Command { @@ -85,7 +86,7 @@ class CommandNSSetKill : public Command "\002IMMED\002, user's nick will be changed immediately \037without\037 being\n" "warned first or given a chance to change their nick; please\n" "do not use this option unless necessary. Also, your\n" - "network's administrators may have disabled this option."), NickServ->nick.c_str()); + "network's administrators may have disabled this option."), Config->s_NickServ.c_str()); return true; } @@ -117,7 +118,7 @@ class CommandNSSASetKill : public CommandNSSetKill "\002IMMED\002, the user's nick will be changed immediately \037without\037 being\n" "warned first or given a chance to change their nick; please\n" "do not use this option unless necessary. Also, your\n" - "network's administrators may have disabled this option."), NickServ->nick.c_str()); + "network's administrators may have disabled this option."), Config->s_NickServ.c_str()); return true; } @@ -138,22 +139,25 @@ class NSSetKill : public Module this->SetAuthor("Anope"); this->SetType(CORE); - Command *c = FindCommand(NickServ, "SET"); + if (!nickserv) + throw ModuleException("NickServ is not loaded!"); + + Command *c = FindCommand(nickserv->Bot(), "SET"); if (c) c->AddSubcommand(this, &commandnssetkill); - c = FindCommand(NickServ, "SASET"); + c = FindCommand(nickserv->Bot(), "SASET"); if (c) c->AddSubcommand(this, &commandnssasetkill); } ~NSSetKill() { - Command *c = FindCommand(NickServ, "SET"); + Command *c = FindCommand(nickserv->Bot(), "SET"); if (c) c->DelSubcommand(&commandnssetkill); - c = FindCommand(NickServ, "SASET"); + c = FindCommand(nickserv->Bot(), "SASET"); if (c) c->DelSubcommand(&commandnssasetkill); } |