1
0
mirror of https://github.com/anope/anope.git synced 2026-06-28 23:06:39 +02:00

Rewrote the config reader to better handle invalid configs.

This prevents Anope from exploding when /os reload has errors.
This commit is contained in:
Adam
2010-08-17 19:27:37 -04:00
parent 2575008baa
commit e65d8b2f3d
195 changed files with 3133 additions and 3249 deletions
+2 -2
View File
@@ -57,7 +57,7 @@ void mod_run_cmd(BotInfo *bi, User *u, Command *c, const Anope::string &command,
// Command requires registered users only
if (!c->HasFlag(CFLAG_ALLOW_UNREGISTERED) && !u->IsIdentified())
{
notice_lang(bi->nick, u, NICK_IDENTIFY_REQUIRED, Config.s_NickServ.c_str());
notice_lang(bi->nick, u, NICK_IDENTIFY_REQUIRED, Config->s_NickServ.c_str());
Alog() << "Access denied for unregistered user " << u->nick << " with service " << bi->nick << " and command " << command;
return;
}
@@ -164,7 +164,7 @@ void mod_help_cmd(BotInfo *bi, User *u, const Anope::string &cmd)
Anope::string subcommand = tokens.StreamEnd() ? "" : tokens.GetRemaining();
if (!c || (Config.HidePrivilegedCommands && !c->permission.empty() && (!u->Account() || !u->Account()->HasCommand(c->permission))) || !c->OnHelp(u, subcommand))
if (!c || (Config->HidePrivilegedCommands && !c->permission.empty() && (!u->Account() || !u->Account()->HasCommand(c->permission))) || !c->OnHelp(u, subcommand))
notice_lang(bi->nick, u, NO_HELP_AVAILABLE, cmd.c_str());
else
{