diff options
| author | Sadie Powell <sadie@witchery.services> | 2025-03-05 16:21:04 +0000 |
|---|---|---|
| committer | Sadie Powell <sadie@witchery.services> | 2025-03-05 16:25:17 +0000 |
| commit | 9926ac5a05ba741690f51a3265f2523a9e43a5c7 (patch) | |
| tree | 78fbabb9f4813f7e3f7d675a4f9f43c37959d2a3 /modules/extra | |
| parent | 14342f6375cce455ddde79cb9403daea6a727b7f (diff) | |
Fix reading the config of some modules.
Diffstat (limited to 'modules/extra')
| -rw-r--r-- | modules/extra/mysql.cpp | 8 | ||||
| -rw-r--r-- | modules/extra/sqlite.cpp | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/modules/extra/mysql.cpp b/modules/extra/mysql.cpp index 9a0a92710..1f6777bcc 100644 --- a/modules/extra/mysql.cpp +++ b/modules/extra/mysql.cpp @@ -272,11 +272,11 @@ public: ++it; - for (i = 0; i < Config->CountBlock("mysql"); ++i) - if (config.GetBlock("mysql", i).Get<const Anope::string>("name", "mysql/main") == cname) + for (i = 0; i < config.CountBlock("mysql"); ++i) + if (config.GetBlock("mysql", i).Get<const Anope::string>("name", "mysql/main") == cname) break; - if (i == Config->CountBlock("mysql")) + if (i == config.CountBlock("mysql")) { Log(LOG_NORMAL, "mysql") << "MySQL: Removing server connection " << cname; @@ -285,7 +285,7 @@ public: } } - for (int i = 0; i < Config->CountBlock("mysql"); ++i) + for (int i = 0; i < config.CountBlock("mysql"); ++i) { Configuration::Block &block = config.GetBlock("mysql", i); const Anope::string &connname = block.Get<const Anope::string>("name", "mysql/main"); diff --git a/modules/extra/sqlite.cpp b/modules/extra/sqlite.cpp index 8808c5847..a53ea26ab 100644 --- a/modules/extra/sqlite.cpp +++ b/modules/extra/sqlite.cpp @@ -124,7 +124,7 @@ public: int i, num; ++it; - for (i = 0, num = Config->CountBlock("sqlite"); i < num; ++i) + for (i = 0, num = config.CountBlock("sqlite"); i < num; ++i) if (config.GetBlock("sqlite", i).Get<const Anope::string>("name", "sqlite/main") == cname) break; @@ -137,7 +137,7 @@ public: } } - for (int i = 0; i < Config->CountBlock("sqlite"); ++i) + for (int i = 0; i < config.CountBlock("sqlite"); ++i) { Configuration::Block &block = config.GetBlock("sqlite", i); Anope::string connname = block.Get<const Anope::string>("name", "sqlite/main"); |
