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/cs_saset.cpp | |
parent | 1782ce260c5bc214ec0b2e39257ab1371b68ae9c (diff) |
Moved the core pseudo clients out into their own modules
Diffstat (limited to 'modules/core/cs_saset.cpp')
-rw-r--r-- | modules/core/cs_saset.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/modules/core/cs_saset.cpp b/modules/core/cs_saset.cpp index 4a512c26d..b262ce14a 100644 --- a/modules/core/cs_saset.cpp +++ b/modules/core/cs_saset.cpp @@ -12,6 +12,7 @@ /*************************************************************************/ #include "module.h" +#include "chanserv.h" class CommandCSSASet : public Command { @@ -55,7 +56,7 @@ class CommandCSSASet : public Command for (std::vector<Anope::string>::const_iterator it = params.begin() + 2, it_end = params.end(); it != it_end; ++it) cmdparams += " " + *it; Log(LOG_ADMIN, u, this, ci) << params[1] << " " << cmdparams; - mod_run_cmd(ChanServ, u, NULL, c, params[1], cmdparams); + mod_run_cmd(chanserv->Bot(), u, NULL, c, params[1], cmdparams); } else { @@ -79,7 +80,7 @@ class CommandCSSASet : public Command for (subcommand_map::iterator it = this->subcommands.begin(), it_end = this->subcommands.end(); it != it_end; ++it) it->second->OnServHelp(source); source.Reply(_("Type \002%s%s HELP SASET \037option\037\002 for more information on a\n" - "particular option."), Config->UseStrictPrivMsgString.c_str(), ChanServ->nick.c_str()); + "particular option."), Config->UseStrictPrivMsgString.c_str(), Config->s_ChanServ.c_str()); return true; } else @@ -131,7 +132,10 @@ class CSSASet : public Module this->SetAuthor("Anope"); this->SetType(CORE); - this->AddCommand(ChanServ, &commandcssaset); + if (!chanserv) + throw ModuleException("ChanServ is not loaded!"); + + this->AddCommand(chanserv->Bot(), &commandcssaset); } }; |