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/hostserv/hostserv.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/hostserv/hostserv.cpp')
-rw-r--r-- | modules/hostserv/hostserv.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/hostserv/hostserv.cpp b/modules/hostserv/hostserv.cpp index 9c8266d02..1a38a7666 100644 --- a/modules/hostserv/hostserv.cpp +++ b/modules/hostserv/hostserv.cpp @@ -22,9 +22,9 @@ public: throw ModuleException("Your IRCd does not support vhosts"); } - void OnReload(Configuration::Conf *conf) override + void OnReload(Configuration::Conf &conf) override { - const Anope::string &hsnick = conf->GetModule(this)->Get<const Anope::string>("client"); + const Anope::string &hsnick = conf.GetModule(this).Get<const Anope::string>("client"); if (hsnick.empty()) throw ConfigException(Module::name + ": <client> must be defined"); @@ -81,7 +81,7 @@ public: void OnUserModeUnset(const MessageSource &setter, User *u, const Anope::string &mname) override { - if (mname == "OPER" && Config->GetModule(this)->Get<bool>("activate_on_deoper", "yes")) + if (mname == "OPER" && Config->GetModule(this).Get<bool>("activate_on_deoper", "yes")) this->OnUserLogin(u); } @@ -95,7 +95,7 @@ public: void OnSetVHost(NickAlias *na) override { - if (Config->GetModule(this)->Get<bool>("activate_on_set", "yes")) + if (Config->GetModule(this).Get<bool>("activate_on_set", "yes")) { User *u = User::Find(na->nick); @@ -120,7 +120,7 @@ public: void OnDeleteVHost(NickAlias *na) override { - if (Config->GetModule(this)->Get<bool>("activate_on_set", "yes")) + if (Config->GetModule(this).Get<bool>("activate_on_set", "yes")) { User *u = User::Find(na->nick); |