From f9911dde529adf3dc03f4f14bbd70756ac2f665c Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 2 Mar 2025 14:51:02 +0000 Subject: 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. --- modules/irc2sql/irc2sql.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'modules/irc2sql/irc2sql.cpp') diff --git a/modules/irc2sql/irc2sql.cpp b/modules/irc2sql/irc2sql.cpp index c288a2366..3c6ab9199 100644 --- a/modules/irc2sql/irc2sql.cpp +++ b/modules/irc2sql/irc2sql.cpp @@ -17,21 +17,21 @@ void IRC2SQL::OnShutdown() quitting = true; } -void IRC2SQL::OnReload(Configuration::Conf *conf) +void IRC2SQL::OnReload(Configuration::Conf &conf) { - Configuration::Block *block = Config->GetModule(this); - prefix = block->Get("prefix", "anope_"); - GeoIPDB = block->Get("geoip_database"); - ctcpuser = block->Get("ctcpuser", "no"); - ctcpeob = block->Get("ctcpeob", "yes"); - Anope::string engine = block->Get("engine"); + Configuration::Block &block = Config->GetModule(this); + prefix = block.Get("prefix", "anope_"); + GeoIPDB = block.Get("geoip_database"); + ctcpuser = block.Get("ctcpuser", "no"); + ctcpeob = block.Get("ctcpeob", "yes"); + Anope::string engine = block.Get("engine"); this->sql = ServiceReference("SQL::Provider", engine); if (sql) this->CheckTables(); else Log() << "IRC2SQL: no database connection to " << engine; - const Anope::string &snick = block->Get("client"); + const Anope::string &snick = block.Get("client"); if (snick.empty()) throw ConfigException(Module::name + ": must be defined"); StatServ = BotInfo::Find(snick, true); -- cgit