mirror of
https://github.com/anope/anope.git
synced 2026-07-07 01:03:13 +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:
@@ -327,13 +327,13 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void OnReload(Configuration::Conf *conf) override
|
||||
void OnReload(Configuration::Conf &conf) override
|
||||
{
|
||||
Configuration::Block *config = conf->GetModule(this);
|
||||
Configuration::Block &config = conf.GetModule(this);
|
||||
|
||||
const Anope::string certfile = Anope::ExpandConfig(config->Get<const Anope::string>("cert", "fullchain.pem"));
|
||||
const Anope::string keyfile = Anope::ExpandConfig(config->Get<const Anope::string>("key", "privkey.pem"));
|
||||
const Anope::string dhfile = Anope::ExpandConfig(config->Get<const Anope::string>("dh", "dhparams.pem"));
|
||||
const Anope::string certfile = Anope::ExpandConfig(config.Get<const Anope::string>("cert", "fullchain.pem"));
|
||||
const Anope::string keyfile = Anope::ExpandConfig(config.Get<const Anope::string>("key", "privkey.pem"));
|
||||
const Anope::string dhfile = Anope::ExpandConfig(config.Get<const Anope::string>("dh", "dhparams.pem"));
|
||||
|
||||
CheckFile(certfile);
|
||||
CheckFile(keyfile);
|
||||
@@ -365,9 +365,9 @@ public:
|
||||
|
||||
void OnPreServerConnect() override
|
||||
{
|
||||
Configuration::Block *config = Config->GetBlock("uplink", Anope::CurrentUplink);
|
||||
Configuration::Block &config = Config->GetBlock("uplink", Anope::CurrentUplink);
|
||||
|
||||
if (config->Get<bool>("ssl"))
|
||||
if (config.Get<bool>("ssl"))
|
||||
{
|
||||
this->service.Init(UplinkSock);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user