mirror of
https://github.com/anope/anope.git
synced 2026-07-09 15:23:12 +02:00
Fix rehashing via SIGHUP and m_mysql
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
+1
-1
@@ -121,7 +121,7 @@ void Anope::HandleSignal()
|
||||
try
|
||||
{
|
||||
Configuration::Conf *new_config = new Configuration::Conf();
|
||||
delete new_config;
|
||||
delete Config;
|
||||
Config = new_config;
|
||||
}
|
||||
catch (const ConfigException &ex)
|
||||
|
||||
Reference in New Issue
Block a user