1
0
mirror of https://github.com/anope/anope.git synced 2026-06-12 19:14:47 +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:
Sadie Powell
2025-03-02 14:51:02 +00:00
parent a5e5eb5eb0
commit f9911dde52
124 changed files with 811 additions and 809 deletions
+9 -9
View File
@@ -497,16 +497,16 @@ public:
{
}
void OnReload(Configuration::Conf *conf) override
void OnReload(Configuration::Conf &conf) override
{
Configuration::Block *block = conf->GetModule(this);
prefix = block->Get<const Anope::string>("prefix", "anope_");
SmileysHappy = block->Get<const Anope::string>("SmileysHappy");
SmileysSad = block->Get<const Anope::string>("SmileysSad");
SmileysOther = block->Get<const Anope::string>("SmileysOther");
NSDefChanstats = block->Get<bool>("ns_def_chanstats");
CSDefChanstats = block->Get<bool>("cs_def_chanstats");
Anope::string engine = block->Get<const Anope::string>("engine");
Configuration::Block &block = conf.GetModule(this);
prefix = block.Get<const Anope::string>("prefix", "anope_");
SmileysHappy = block.Get<const Anope::string>("SmileysHappy");
SmileysSad = block.Get<const Anope::string>("SmileysSad");
SmileysOther = block.Get<const Anope::string>("SmileysOther");
NSDefChanstats = block.Get<bool>("ns_def_chanstats");
CSDefChanstats = block.Get<bool>("cs_def_chanstats");
Anope::string engine = block.Get<const Anope::string>("engine");
this->sql = ServiceReference<SQL::Provider>("SQL::Provider", engine);
if (sql)
this->CheckTables();