summaryrefslogtreecommitdiff
path: root/modules/core/cs_set_signkick.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-08-17 19:27:37 -0400
committerAdam <Adam@anope.org>2010-08-17 19:27:37 -0400
commite65d8b2f3dfdb40858259b3bb48ef6998c31e62f (patch)
treefd845bdef5664d025ab19c262ae2c5e9d23d7bb2 /modules/core/cs_set_signkick.cpp
parent2575008baa5c9d0ca789680da1a3b81dc74786f7 (diff)
Rewrote the config reader to better handle invalid configs.
This prevents Anope from exploding when /os reload has errors.
Diffstat (limited to 'modules/core/cs_set_signkick.cpp')
-rw-r--r--modules/core/cs_set_signkick.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/core/cs_set_signkick.cpp b/modules/core/cs_set_signkick.cpp
index c0d39d7cf..11210524f 100644
--- a/modules/core/cs_set_signkick.cpp
+++ b/modules/core/cs_set_signkick.cpp
@@ -30,19 +30,19 @@ class CommandCSSetSignKick : public Command
{
ci->SetFlag(CI_SIGNKICK);
ci->UnsetFlag(CI_SIGNKICK_LEVEL);
- notice_lang(Config.s_ChanServ, u, CHAN_SET_SIGNKICK_ON, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_SIGNKICK_ON, ci->name.c_str());
}
else if (params[1].equals_ci("LEVEL"))
{
ci->SetFlag(CI_SIGNKICK_LEVEL);
ci->UnsetFlag(CI_SIGNKICK);
- notice_lang(Config.s_ChanServ, u, CHAN_SET_SIGNKICK_LEVEL, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_SIGNKICK_LEVEL, ci->name.c_str());
}
else if (params[1].equals_ci("OFF"))
{
ci->UnsetFlag(CI_SIGNKICK);
ci->UnsetFlag(CI_SIGNKICK_LEVEL);
- notice_lang(Config.s_ChanServ, u, CHAN_SET_SIGNKICK_OFF, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_SIGNKICK_OFF, ci->name.c_str());
}
else
this->OnSyntaxError(u, "SIGNKICK");
@@ -52,18 +52,18 @@ class CommandCSSetSignKick : public Command
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_SIGNKICK, "SET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_SIGNKICK, "SET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_ChanServ, u, "SET SIGNKICK", CHAN_SET_SIGNKICK_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SET SIGNKICK", CHAN_SET_SIGNKICK_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_SET_SIGNKICK);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_SET_SIGNKICK);
}
};
@@ -76,13 +76,13 @@ class CommandCSSASetSignKick : public CommandCSSetSignKick
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_SIGNKICK, "SASET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_SIGNKICK, "SASET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_ChanServ, u, "SASET SIGNKICK", CHAN_SASET_SIGNKICK_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SASET SIGNKICK", CHAN_SASET_SIGNKICK_SYNTAX);
}
};