diff options
author | Adam <Adam@anope.org> | 2010-08-17 19:27:37 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-08-17 19:27:37 -0400 |
commit | e65d8b2f3dfdb40858259b3bb48ef6998c31e62f (patch) | |
tree | fd845bdef5664d025ab19c262ae2c5e9d23d7bb2 /modules/core/cs_set_topiclock.cpp | |
parent | 2575008baa5c9d0ca789680da1a3b81dc74786f7 (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_topiclock.cpp')
-rw-r--r-- | modules/core/cs_set_topiclock.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/core/cs_set_topiclock.cpp b/modules/core/cs_set_topiclock.cpp index 44ae5390c..4e54267a7 100644 --- a/modules/core/cs_set_topiclock.cpp +++ b/modules/core/cs_set_topiclock.cpp @@ -29,12 +29,12 @@ class CommandCSSetTopicLock : public Command if (params[1].equals_ci("ON")) { ci->SetFlag(CI_TOPICLOCK); - notice_lang(Config.s_ChanServ, u, CHAN_SET_TOPICLOCK_ON, ci->name.c_str()); + notice_lang(Config->s_ChanServ, u, CHAN_SET_TOPICLOCK_ON, ci->name.c_str()); } else if (params[1].equals_ci("OFF")) { ci->UnsetFlag(CI_TOPICLOCK); - notice_lang(Config.s_ChanServ, u, CHAN_SET_TOPICLOCK_OFF, ci->name.c_str()); + notice_lang(Config->s_ChanServ, u, CHAN_SET_TOPICLOCK_OFF, ci->name.c_str()); } else this->OnSyntaxError(u, "TOPICLOCK"); @@ -44,18 +44,18 @@ class CommandCSSetTopicLock : public Command bool OnHelp(User *u, const Anope::string &) { - notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_TOPICLOCK, "SET"); + notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_TOPICLOCK, "SET"); return true; } void OnSyntaxError(User *u, const Anope::string &) { - syntax_error(Config.s_ChanServ, u, "SET", CHAN_SET_TOPICLOCK_SYNTAX);; + syntax_error(Config->s_ChanServ, u, "SET", CHAN_SET_TOPICLOCK_SYNTAX);; } void OnServHelp(User *u) { - notice_lang(Config.s_ChanServ, u, CHAN_HELP_CMD_SET_TOPICLOCK); + notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_SET_TOPICLOCK); } }; @@ -68,13 +68,13 @@ class CommandCSSASetTopicLock : public CommandCSSetTopicLock bool OnHelp(User *u, const Anope::string &) { - notice_help(Config.s_ChanServ, u, CHAN_HELP_SET_TOPICLOCK, "SASET"); + notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_TOPICLOCK, "SASET"); return true; } void OnSyntaxError(User *u, const Anope::string &) { - syntax_error(Config.s_ChanServ, u, "SASET", CHAN_SASET_TOPICLOCK_SYNTAX); + syntax_error(Config->s_ChanServ, u, "SASET", CHAN_SASET_TOPICLOCK_SYNTAX); } }; |