diff options
author | Sadie Powell <sadie@witchery.services> | 2025-03-02 14:51:02 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2025-03-02 15:27:47 +0000 |
commit | f9911dde529adf3dc03f4f14bbd70756ac2f665c (patch) | |
tree | 7c720e4f82fdb30b7d8a22fc0809f50bc862fae3 /modules/nickserv/ns_cert.cpp | |
parent | a5e5eb5eb084e8343260ce7bc26ea86798f64fe1 (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/nickserv/ns_cert.cpp')
-rw-r--r-- | modules/nickserv/ns_cert.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/nickserv/ns_cert.cpp b/modules/nickserv/ns_cert.cpp index 9a697df17..15f6dbab8 100644 --- a/modules/nickserv/ns_cert.cpp +++ b/modules/nickserv/ns_cert.cpp @@ -204,7 +204,7 @@ private: void DoAdd(CommandSource &source, NickCore *nc, Anope::string certfp) { NSCertList *cl = nc->Require<NSCertList>("certificates"); - unsigned max = Config->GetModule(this->owner)->Get<unsigned>("max", "5"); + unsigned max = Config->GetModule(this->owner).Get<unsigned>("max", "5"); if (cl->GetCertCount() >= max) { @@ -325,7 +325,7 @@ public: source.Reply(ACCESS_DENIED); return; } - else if (Config->GetModule("nickserv")->Get<bool>("secureadmins", "yes") && source.GetAccount() != na->nc && na->nc->IsServicesOper() && !cmd.equals_ci("LIST")) + else if (Config->GetModule("nickserv").Get<bool>("secureadmins", "yes") && source.GetAccount() != na->nc && na->nc->IsServicesOper() && !cmd.equals_ci("LIST")) { source.Reply(_("You may view but not modify the certificate list of other Services Operators.")); return; @@ -401,7 +401,7 @@ public: if (!nc || nc->HasExt("NS_SUSPENDED")) return; - unsigned int maxlogins = Config->GetModule("ns_identify")->Get<unsigned int>("maxlogins"); + unsigned int maxlogins = Config->GetModule("ns_identify").Get<unsigned int>("maxlogins"); if (maxlogins && nc->users.size() >= maxlogins) { u->SendMessage(NickServ, _("Account \002%s\002 has already reached the maximum number of simultaneous logins (%u)."), nc->display.c_str(), maxlogins); @@ -420,7 +420,7 @@ public: void OnNickRegister(User *u, NickAlias *na, const Anope::string &pass) override { - if (!Config->GetModule(this)->Get<bool>("automatic", "yes") || !u || u->fingerprint.empty()) + if (!Config->GetModule(this).Get<bool>("automatic", "yes") || !u || u->fingerprint.empty()) return; auto *cl = certs.Require(na->nc); @@ -437,7 +437,7 @@ public: { BotInfo *NickServ = Config->GetClient("NickServ"); - unsigned int maxlogins = Config->GetModule("ns_identify")->Get<unsigned int>("maxlogins"); + unsigned int maxlogins = Config->GetModule("ns_identify").Get<unsigned int>("maxlogins"); if (maxlogins && na->nc->users.size() >= maxlogins) { u->SendMessage(NickServ, _("Account \002%s\002 has already reached the maximum number of simultaneous logins (%u)."), na->nc->display.c_str(), maxlogins); |