From f9911dde529adf3dc03f4f14bbd70756ac2f665c Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 2 Mar 2025 14:51:02 +0000 Subject: 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. --- modules/protocol/hybrid.cpp | 2 +- modules/protocol/inspircd.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/protocol') diff --git a/modules/protocol/hybrid.cpp b/modules/protocol/hybrid.cpp index 59f535e8a..30ae296ff 100644 --- a/modules/protocol/hybrid.cpp +++ b/modules/protocol/hybrid.cpp @@ -796,7 +796,7 @@ public: message_tmode(this), message_uid(this) { - if (Config->GetModule(this)) + if (IRCD == &ircd_proto) this->AddModes(); } diff --git a/modules/protocol/inspircd.cpp b/modules/protocol/inspircd.cpp index b0e059d73..538a27a37 100644 --- a/modules/protocol/inspircd.cpp +++ b/modules/protocol/inspircd.cpp @@ -105,7 +105,7 @@ class InspIRCdProto final private: static Anope::string GetAccountNicks(NickAlias* na) { - if (!na || Config->GetModule("nickserv")->Get("nonicknameownership")) + if (!na || Config->GetModule("nickserv").Get("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("casemap", "ascii") + (sha256 ? " CHALLENGE=*" : "")); + Uplink::Send("CAPAB", "CAPABILITIES", "CASEMAPPING=" + Config->GetBlock("options").Get("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("regexengine"); + const auto &anoperegex = Config->GetBlock("options").Get("regexengine"); if (!anoperegex.empty() && !inspircdregex.empty() && anoperegex != inspircdregex) Log() << "Warning: InspIRCd is using regex engine " << inspircdregex << ", but we have " << anoperegex << ". This may cause inconsistencies."; } -- cgit