mirror of
https://github.com/anope/anope.git
synced 2026-06-30 19:26:38 +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:
@@ -22,20 +22,20 @@ class CommandOSUpdate : public Command
|
||||
|
||||
CommandReturn Execute(User *u, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
notice_lang(Config.s_OperServ, u, OPER_UPDATING);
|
||||
notice_lang(Config->s_OperServ, u, OPER_UPDATING);
|
||||
save_data = true;
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
{
|
||||
notice_help(Config.s_OperServ, u, OPER_HELP_UPDATE);
|
||||
notice_help(Config->s_OperServ, u, OPER_HELP_UPDATE);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
{
|
||||
notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_UPDATE);
|
||||
notice_lang(Config->s_OperServ, u, OPER_HELP_CMD_UPDATE);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user