1
0
mirror of https://github.com/anope/anope.git synced 2026-07-02 23:03:12 +02:00

Return references instead of pointers from the config system.

We used to return NULL from these methods but now we return an empty
block so this can never actually be null now.
This commit is contained in:
Sadie Powell
2025-03-02 14:51:02 +00:00
parent a5e5eb5eb0
commit f9911dde52
124 changed files with 811 additions and 809 deletions
+3 -3
View File
@@ -105,7 +105,7 @@ class InspIRCdProto final
private:
static Anope::string GetAccountNicks(NickAlias* na)
{
if (!na || Config->GetModule("nickserv")->Get<bool>("nonicknameownership"))
if (!na || Config->GetModule("nickserv").Get<bool>("nonicknameownership"))
return {};
Anope::string nicks;
@@ -188,7 +188,7 @@ public:
void SendConnect() override
{
Uplink::Send("CAPAB", "START", 1206);
Uplink::Send("CAPAB", "CAPABILITIES", "CASEMAPPING=" + Config->GetBlock("options")->Get<const Anope::string>("casemap", "ascii") + (sha256 ? " CHALLENGE=*" : ""));
Uplink::Send("CAPAB", "CAPABILITIES", "CASEMAPPING=" + Config->GetBlock("options").Get<const Anope::string>("casemap", "ascii") + (sha256 ? " CHALLENGE=*" : ""));
Uplink::Send("CAPAB", "END");
}
@@ -1553,7 +1553,7 @@ struct IRCDMessageCapab final
IRCD->CanTagMessage = true;
}
const auto &anoperegex = Config->GetBlock("options")->Get<const Anope::string>("regexengine");
const auto &anoperegex = Config->GetBlock("options").Get<const Anope::string>("regexengine");
if (!anoperegex.empty() && !inspircdregex.empty() && anoperegex != inspircdregex)
Log() << "Warning: InspIRCd is using regex engine " << inspircdregex << ", but we have " << anoperegex << ". This may cause inconsistencies.";
}