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. --- src/users.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/users.cpp') diff --git a/src/users.cpp b/src/users.cpp index f6a4adb37..8f8e9570d 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -835,14 +835,14 @@ Anope::string User::Mask() const bool User::BadPassword() { - if (!Config->GetBlock("options")->Get("badpasslimit")) + if (!Config->GetBlock("options").Get("badpasslimit")) return false; - if (Config->GetBlock("options")->Get("badpasstimeout") > 0 && this->invalid_pw_time > 0 && this->invalid_pw_time < Anope::CurTime - Config->GetBlock("options")->Get("badpasstimeout")) + if (Config->GetBlock("options").Get("badpasstimeout") > 0 && this->invalid_pw_time > 0 && this->invalid_pw_time < Anope::CurTime - Config->GetBlock("options").Get("badpasstimeout")) this->invalid_pw_count = 0; ++this->invalid_pw_count; this->invalid_pw_time = Anope::CurTime; - if (this->invalid_pw_count >= Config->GetBlock("options")->Get("badpasslimit")) + if (this->invalid_pw_count >= Config->GetBlock("options").Get("badpasslimit")) { this->Kill(Me, "Too many invalid passwords"); return true; -- cgit