summaryrefslogtreecommitdiff
path: root/modules/extra/m_mysql.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-07-04 01:19:40 -0400
committerAdam <Adam@anope.org>2013-07-04 01:19:40 -0400
commit998925c90a7ffa3dc6c4bf715699565dac49c10c (patch)
tree355d1dbe3c86ca08e61976baa905bb3cd30264aa /modules/extra/m_mysql.cpp
parent7f971043bc0b552e0ec2f3a88bf123cecb007387 (diff)
Fix rehashing via SIGHUP and m_mysql
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;