mirror of
https://github.com/anope/anope.git
synced 2026-06-28 19:56: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:
@@ -29,9 +29,9 @@ class CommandHSHelp : public Command
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
{
|
||||
notice_help(Config.s_HostServ, u, HOST_HELP, Config.s_HostServ.c_str());
|
||||
notice_help(Config->s_HostServ, u, HOST_HELP, Config->s_HostServ.c_str());
|
||||
for (CommandMap::const_iterator it = HostServ->Commands.begin(), it_end = HostServ->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);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user