summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_spanningtree/main.cpp2
-rw-r--r--src/modules/m_spanningtree/treesocket2.cpp2
-rw-r--r--src/modules/m_spanningtree/utils.cpp8
3 files changed, 10 insertions, 2 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index b96fd3d12..61df8cb5e 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -736,7 +736,7 @@ void ModuleSpanningTree::OnRehash(User* user, const std::string &parameter)
ServerInstance->RehashServer();
}
}
- Utils->ReadConfiguration(false);
+ Utils->ReadConfiguration(true);
InitializeDisabledCommands(ServerInstance->Config->DisabledCommands, ServerInstance);
}
diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp
index 838d51c92..3b9dc5e8e 100644
--- a/src/modules/m_spanningtree/treesocket2.cpp
+++ b/src/modules/m_spanningtree/treesocket2.cpp
@@ -378,7 +378,7 @@ bool TreeSocket::RemoteRehash(const std::string &prefix, std::deque<std::string>
{
this->Instance->SNO->WriteToSnoMask('l',"Remote rehash initiated by \002"+prefix+"\002.");
this->Instance->RehashServer();
- Utils->ReadConfiguration(false);
+ Utils->ReadConfiguration(true);
InitializeDisabledCommands(Instance->Config->DisabledCommands, Instance);
}
Utils->DoOneToAllButSender(prefix,"REHASH",params,prefix);
diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp
index afd029c16..288d91def 100644
--- a/src/modules/m_spanningtree/utils.cpp
+++ b/src/modules/m_spanningtree/utils.cpp
@@ -470,6 +470,14 @@ void SpanningTreeUtilities::ReadConfiguration(bool rebind)
ConfigReader* Conf = new ConfigReader(ServerInstance);
if (rebind)
{
+ for (unsigned int i = 0; i < Bindings.size(); i++)
+ {
+ ServerInstance->SE->DelFd(Bindings[i]);
+ Bindings[i]->Close();
+ }
+ ServerInstance->InspSocketCull();
+ Bindings.clear();
+
for (int j = 0; j < Conf->Enumerate("bind"); j++)
{
std::string Type = Conf->ReadValue("bind","type",j);