diff options
| author | Sadie Powell <sadie@witchery.services> | 2025-04-19 12:47:52 +0100 |
|---|---|---|
| committer | Sadie Powell <sadie@witchery.services> | 2025-04-19 12:49:06 +0100 |
| commit | d81590639331f9b233d3e16512aeb01f5c024a16 (patch) | |
| tree | 12cc140e7e9de0750108aa8830a65205b3246280 /modules/extra | |
| parent | 452e62c05021b29b4f0641245cafa6ae115e2198 (diff) | |
Get rid of the internal block wrapper.
This only existed for compatibility with old 2.0 modules and 2.1
has already broken compatibility with them.
Diffstat (limited to 'modules/extra')
| -rw-r--r-- | modules/extra/ldap.cpp | 4 | ||||
| -rw-r--r-- | modules/extra/mysql.cpp | 4 | ||||
| -rw-r--r-- | modules/extra/sqlite.cpp | 4 | ||||
| -rw-r--r-- | modules/extra/ssl_gnutls.cpp | 4 | ||||
| -rw-r--r-- | modules/extra/ssl_openssl.cpp | 4 |
5 files changed, 10 insertions, 10 deletions
diff --git a/modules/extra/ldap.cpp b/modules/extra/ldap.cpp index 0ea09afb5..3a26281d9 100644 --- a/modules/extra/ldap.cpp +++ b/modules/extra/ldap.cpp @@ -546,7 +546,7 @@ public: void OnReload(Configuration::Conf &config) override { - Configuration::Block &conf = config.GetModule(this); + const auto &conf = config.GetModule(this); for (std::map<Anope::string, LDAPService *>::iterator it = this->LDAPServices.begin(); it != this->LDAPServices.end();) { @@ -574,7 +574,7 @@ public: for (int i = 0; i < conf.CountBlock("ldap"); ++i) { - Configuration::Block &ldap = conf.GetBlock("ldap", i); + const auto &ldap = conf.GetBlock("ldap", i); const Anope::string &connname = ldap.Get<const Anope::string>("name", "ldap/main"); diff --git a/modules/extra/mysql.cpp b/modules/extra/mysql.cpp index 294ddfac0..34fb097bb 100644 --- a/modules/extra/mysql.cpp +++ b/modules/extra/mysql.cpp @@ -262,7 +262,7 @@ public: void OnReload(Configuration::Conf &conf) override { - Configuration::Block &config = conf.GetModule(this); + const auto &config = conf.GetModule(this); for (std::map<Anope::string, MySQLService *>::iterator it = this->MySQLServices.begin(); it != this->MySQLServices.end();) { @@ -287,7 +287,7 @@ public: for (int i = 0; i < config.CountBlock("mysql"); ++i) { - Configuration::Block &block = config.GetBlock("mysql", i); + const auto &block = config.GetBlock("mysql", i); const Anope::string &connname = block.Get<const Anope::string>("name", "mysql/main"); if (this->MySQLServices.find(connname) == this->MySQLServices.end()) diff --git a/modules/extra/sqlite.cpp b/modules/extra/sqlite.cpp index a53ea26ab..524ad9af1 100644 --- a/modules/extra/sqlite.cpp +++ b/modules/extra/sqlite.cpp @@ -115,7 +115,7 @@ public: void OnReload(Configuration::Conf &conf) override { - Configuration::Block &config = conf.GetModule(this); + const auto &config = conf.GetModule(this); for (std::map<Anope::string, SQLiteService *>::iterator it = this->SQLiteServices.begin(); it != this->SQLiteServices.end();) { @@ -139,7 +139,7 @@ public: for (int i = 0; i < config.CountBlock("sqlite"); ++i) { - Configuration::Block &block = config.GetBlock("sqlite", i); + const auto &block = config.GetBlock("sqlite", i); Anope::string connname = block.Get<const Anope::string>("name", "sqlite/main"); if (this->SQLiteServices.find(connname) == this->SQLiteServices.end()) diff --git a/modules/extra/ssl_gnutls.cpp b/modules/extra/ssl_gnutls.cpp index 97693eb49..0d77b8edc 100644 --- a/modules/extra/ssl_gnutls.cpp +++ b/modules/extra/ssl_gnutls.cpp @@ -329,7 +329,7 @@ public: void OnReload(Configuration::Conf &conf) override { - Configuration::Block &config = conf.GetModule(this); + const auto &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")); @@ -365,7 +365,7 @@ public: void OnPreServerConnect() override { - Configuration::Block &config = Config->GetBlock("uplink", Anope::CurrentUplink); + const auto &config = Config->GetBlock("uplink", Anope::CurrentUplink); if (config.Get<bool>("ssl")) { diff --git a/modules/extra/ssl_openssl.cpp b/modules/extra/ssl_openssl.cpp index a5c840518..1380fb97a 100644 --- a/modules/extra/ssl_openssl.cpp +++ b/modules/extra/ssl_openssl.cpp @@ -146,7 +146,7 @@ public: void OnReload(Configuration::Conf &conf) override { - Configuration::Block &config = conf.GetModule(this); + const auto &config = conf.GetModule(this); this->certfile = Anope::ExpandConfig(config.Get<const Anope::string>("cert", "fullchain.pem")); this->keyfile = Anope::ExpandConfig(config.Get<const Anope::string>("key", "privkey.pem")); @@ -213,7 +213,7 @@ public: void OnPreServerConnect() override { - Configuration::Block &config = Config->GetBlock("uplink", Anope::CurrentUplink); + const auto &config = Config->GetBlock("uplink", Anope::CurrentUplink); if (config.Get<bool>("ssl")) { |
