mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-12 03:59:03 -04:00
Rebind server sockets on REHASH, closes bug #478
git-svn-id: http://svn.inspircd.org/repository/branches/1_1_stable@8664 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
0632fe2505
commit
b3e7819f5c
@ -1147,7 +1147,7 @@ void ModuleSpanningTree::OnRehash(userrec* user, const std::string ¶meter)
|
||||
ServerInstance->RehashServer();
|
||||
}
|
||||
}
|
||||
Utils->ReadConfiguration(false);
|
||||
Utils->ReadConfiguration(true);
|
||||
InitializeDisabledCommands(ServerInstance->Config->DisabledCommands, ServerInstance);
|
||||
}
|
||||
|
||||
|
@ -349,7 +349,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);
|
||||
|
@ -454,6 +454,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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user