summaryrefslogtreecommitdiff
path: root/modules/protocol/inspircd.cpp
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2025-03-02 14:51:02 +0000
committerSadie Powell <sadie@witchery.services>2025-03-02 15:27:47 +0000
commitf9911dde529adf3dc03f4f14bbd70756ac2f665c (patch)
tree7c720e4f82fdb30b7d8a22fc0809f50bc862fae3 /modules/protocol/inspircd.cpp
parenta5e5eb5eb084e8343260ce7bc26ea86798f64fe1 (diff)
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.
Diffstat (limited to 'modules/protocol/inspircd.cpp')
-rw-r--r--modules/protocol/inspircd.cpp6
1 files changed, 3 insertions, 3 deletions
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<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.";
}