]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Forward port r8664: bind server sockets on /rehash
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Tue, 8 Jan 2008 15:36:11 +0000 (15:36 +0000)
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Tue, 8 Jan 2008 15:36:11 +0000 (15:36 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8665 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/m_spanningtree/main.cpp
src/modules/m_spanningtree/treesocket2.cpp
src/modules/m_spanningtree/utils.cpp

index b96fd3d1259b537c88a25e882de80711e0acf75c..61df8cb5ef52761ef6f23d608b88b0d4f8fec705 100644 (file)
@@ -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);
 }
 
index 838d51c927b31bc7c57250ebe99334ec3a55bb5f..3b9dc5e8eff24e9b93d1e75265f70920e1470c55 100644 (file)
@@ -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);
index afd029c1646d5c42e9de44cef6db9d520930592c..288d91def561e1cf54f2181dd307ac223d01c482 100644 (file)
@@ -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);