summaryrefslogtreecommitdiff
path: root/modules/extra/m_mysql.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/extra/m_mysql.cpp')
-rw-r--r--modules/extra/m_mysql.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/extra/m_mysql.cpp b/modules/extra/m_mysql.cpp
index 3b8715c52..79198a814 100644
--- a/modules/extra/m_mysql.cpp
+++ b/modules/extra/m_mysql.cpp
@@ -189,7 +189,7 @@ class ModuleSQL : public Module, public Pipe
void OnReload(Configuration::Conf *conf) anope_override
{
Configuration::Block *config = Config->GetModule(this);
- int i, num;
+ int i;
for (std::map<Anope::string, MySQLService *>::iterator it = this->MySQLServices.begin(); it != this->MySQLServices.end();)
{
@@ -201,7 +201,7 @@ class ModuleSQL : public Module, public Pipe
if (Config->GetBlock("mysql", i)->Get<const Anope::string>("name", "main") == cname)
break;
- if (i == num)
+ if (i == Config->CountBlock("mysql"))
{
Log(LOG_NORMAL, "mysql") << "MySQL: Removing server connection " << cname;