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/chanserv/cs_akick.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/chanserv/cs_akick.cpp')
-rw-r--r-- | modules/chanserv/cs_akick.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/chanserv/cs_akick.cpp b/modules/chanserv/cs_akick.cpp index 489b18772..ad58a814b 100644 --- a/modules/chanserv/cs_akick.cpp +++ b/modules/chanserv/cs_akick.cpp @@ -46,7 +46,7 @@ class CommandCSAKick final const NickAlias *na = NickAlias::Find(mask); NickCore *nc = NULL; const AutoKick *akick; - unsigned reasonmax = Config->GetModule("chanserv")->Get<unsigned>("reasonmax", "200"); + unsigned reasonmax = Config->GetModule("chanserv").Get<unsigned>("reasonmax", "200"); if (reason.length() > reasonmax) reason = reason.substr(0, reasonmax); @@ -170,9 +170,9 @@ class CommandCSAKick final } } - if (ci->GetAkickCount() >= Config->GetModule(this->owner)->Get<unsigned>("autokickmax")) + if (ci->GetAkickCount() >= Config->GetModule(this->owner).Get<unsigned>("autokickmax")) { - source.Reply(_("Sorry, you can only have %d autokick masks on a channel."), Config->GetModule(this->owner)->Get<unsigned>("autokickmax")); + source.Reply(_("Sorry, you can only have %d autokick masks on a channel."), Config->GetModule(this->owner).Get<unsigned>("autokickmax")); return; } @@ -568,7 +568,7 @@ public: reason = autokick->reason; if (reason.empty()) { - reason = Language::Translate(u, Config->GetModule(this)->Get<const Anope::string>("autokickreason").c_str()); + reason = Language::Translate(u, Config->GetModule(this).Get<const Anope::string>("autokickreason").c_str()); reason = reason.replace_all_cs("%n", u->nick) .replace_all_cs("%c", c->name); } |