1
0
mirror of https://github.com/anope/anope.git synced 2026-07-02 21:43:13 +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
+5 -5
View File
@@ -194,7 +194,7 @@ class InspIRCdProto : public IRCDProto
/* SQLINE */
void SendSQLine(const XLine *x)
{
send_cmd(TS6SID, "ADDLINE Q %s %s %ld 0 :%s", x->Mask.c_str(), Config.s_OperServ.c_str(), static_cast<long>(time(NULL)), x->Reason.c_str());
send_cmd(TS6SID, "ADDLINE Q %s %s %ld 0 :%s", x->Mask.c_str(), Config->s_OperServ.c_str(), static_cast<long>(time(NULL)), x->Reason.c_str());
}
/* SQUIT */
@@ -218,7 +218,7 @@ class InspIRCdProto : public IRCDProto
inspircd_cmd_pass(uplink_server->password);
SendServer(Me);
send_cmd(TS6SID, "BURST");
send_cmd(TS6SID, "VERSION :Anope-%s %s :%s - (%s) -- %s", Anope::Version().c_str(), Config.ServerName.c_str(), ircd->name, Config.EncModuleList.begin()->c_str(), Anope::Build().c_str());
send_cmd(TS6SID, "VERSION :Anope-%s %s :%s - (%s) -- %s", Anope::Version().c_str(), Config->ServerName.c_str(), ircd->name, Config->EncModuleList.begin()->c_str(), Anope::Build().c_str());
}
/* CHGIDENT */
@@ -233,7 +233,7 @@ class InspIRCdProto : public IRCDProto
/* SVSHOLD - set */
void SendSVSHold(const Anope::string &nick)
{
send_cmd(OperServ->GetUID(), "SVSHOLD %s %u :Being held for registered user", nick.c_str(), static_cast<unsigned>(Config.NSReleaseTimeout));
send_cmd(OperServ->GetUID(), "SVSHOLD %s %u :Being held for registered user", nick.c_str(), static_cast<unsigned>(Config->NSReleaseTimeout));
}
/* SVSHOLD - release */
@@ -1285,8 +1285,8 @@ class ProtoInspIRCd : public Module
this->SetAuthor("Anope");
this->SetType(PROTOCOL);
if (!Config.Numeric.empty())
TS6SID = Config.Numeric;
if (!Config->Numeric.empty())
TS6SID = Config->Numeric;
pmodule_ircd_version("InspIRCd 1.2");
pmodule_ircd_var(myIrcd);