summaryrefslogtreecommitdiff
path: root/modules/core/cs_saset.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/core/cs_saset.cpp')
-rw-r--r--modules/core/cs_saset.cpp10
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);
}
};