mirror of
https://github.com/anope/anope.git
synced 2026-06-29 11:56:38 +02:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user