summaryrefslogtreecommitdiff
path: root/modules/core/ns_help.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/ns_help.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/ns_help.cpp')
-rw-r--r--modules/core/ns_help.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/core/ns_help.cpp b/modules/core/ns_help.cpp
index 1ece4bc00..7dad067b9 100644
--- a/modules/core/ns_help.cpp
+++ b/modules/core/ns_help.cpp
@@ -28,9 +28,9 @@ class CommandNSHelp : public Command
if (cmd.equals_ci("SET LANGUAGE"))
{
int i;
- notice_help(Config.s_NickServ, u, NICK_HELP_SET_LANGUAGE);
+ notice_help(Config->s_NickServ, u, NICK_HELP_SET_LANGUAGE);
for (i = 0; i < NUM_LANGS && langlist[i] >= 0; ++i)
- u->SendMessage(Config.s_NickServ, " %2d) %s", i + 1, langnames[langlist[i]]);
+ u->SendMessage(Config->s_NickServ, " %2d) %s", i + 1, langnames[langlist[i]]);
}
else
mod_help_cmd(NickServ, u, cmd);
@@ -40,15 +40,15 @@ class CommandNSHelp : public Command
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
- notice_help(Config.s_NickServ, u, NICK_HELP);
+ notice_help(Config->s_NickServ, u, NICK_HELP);
for (CommandMap::const_iterator it = NickServ->Commands.begin(), it_end = NickServ->Commands.end(); it != it_end; ++it)
- if (!Config.HidePrivilegedCommands || it->second->permission.empty() || (u->Account() && u->Account()->HasCommand(it->second->permission)))
+ if (!Config->HidePrivilegedCommands || it->second->permission.empty() || (u->Account() && u->Account()->HasCommand(it->second->permission)))
it->second->OnServHelp(u);
if (u->Account() && u->Account()->IsServicesOper())
- notice_help(Config.s_NickServ, u, NICK_SERVADMIN_HELP);
- if (Config.NSExpire >= 86400)
- notice_help(Config.s_NickServ, u, NICK_HELP_EXPIRES, Config.NSExpire / 86400);
- notice_help(Config.s_NickServ, u, NICK_HELP_FOOTER);
+ notice_help(Config->s_NickServ, u, NICK_SERVADMIN_HELP);
+ if (Config->NSExpire >= 86400)
+ notice_help(Config->s_NickServ, u, NICK_HELP_EXPIRES, Config->NSExpire / 86400);
+ notice_help(Config->s_NickServ, u, NICK_HELP_FOOTER);
}
};