summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-01-08 15:36:11 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-01-08 15:36:11 +0000
commit38ba80102f0c349c0d0df83990180320ddd054f8 (patch)
treea9a1b97d3297b472978ed5693bf93dedf817f1b7 /src
parente7310ca2f66d2e267efc62deca53a8b534bdd0eb (diff)
Forward port r8664: bind server sockets on /rehash
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8665 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-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);