summaryrefslogtreecommitdiff
path: root/modules/core/cs_set_secureops.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_secureops.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_secureops.cpp')
-rw-r--r--modules/core/cs_set_secureops.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/core/cs_set_secureops.cpp b/modules/core/cs_set_secureops.cpp
index d0c4554f6..0aeadd818 100644
--- a/modules/core/cs_set_secureops.cpp
+++ b/modules/core/cs_set_secureops.cpp
@@ -29,12 +29,12 @@ class CommandCSSetSecureOps : public Command
if (params[1].equals_ci("ON"))
{
ci->SetFlag(CI_SECUREOPS);
- notice_lang(Config.s_ChanServ, u, CHAN_SET_SECUREOPS_ON, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_SECUREOPS_ON, ci->name.c_str());
}
else if (params[1].equals_ci("OFF"))
{
ci->UnsetFlag(CI_SECUREOPS);
- notice_lang(Config.s_ChanServ, u, CHAN_SET_SECUREOPS_OFF, ci->name.c_str());
+ notice_lang(Config->s_ChanServ, u, CHAN_SET_SECUREOPS_OFF, ci->name.c_str());
}
else
this->OnSyntaxError(u, "SECUREOPS");
@@ -44,18 +44,18 @@ class CommandCSSetSecureOps : public Command
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_SECUREOPS, "SET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_SECUREOPS, "SET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_ChanServ, u, "SET SECUREOPS", CHAN_SET_SECUREOPS_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SET SECUREOPS", CHAN_SET_SECUREOPS_SYNTAX);
}
void OnServHelp(User *u)
{
- notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_SET_SECUREOPS);
+ notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_SET_SECUREOPS);
}
};
@@ -68,13 +68,13 @@ class CommandCSSASetSecureOps : public CommandCSSetSecureOps
bool OnHelp(User *u, const Anope::string &)
{
- notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_SECUREOPS, "SASET");
+ notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_SECUREOPS, "SASET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
- syntax_error(Config.s_ChanServ, u, "SASET SECUREOPS", CHAN_SASET_SECUREOPS_SYNTAX);
+ syntax_error(Config->s_ChanServ, u, "SASET SECUREOPS", CHAN_SASET_SECUREOPS_SYNTAX);
}
};