summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-11-26 22:15:21 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-11-26 22:15:21 +0000
commit856391e5d8a9f562a08d2e7b6dbb0231ee961202 (patch)
tree2934387075c56b2135d5bc6a2c4fbdaa2a33932b /src
parent48615694122de0e4068a2bec6f7d9289112f2f4c (diff)
Fixed dumb bug where module claims ALL bindable ports including client ports!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1963 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_spanningtree.cpp33
1 files changed, 18 insertions, 15 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index 727487545..688df280a 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -184,24 +184,27 @@ class ModuleSpanningTree : public Module
{
for (int j =0; j < Conf->Enumerate("bind"); j++)
{
- std::string TypeName = Conf->ReadValue("bind","type",j);
+ std::string Type = Conf->ReadValue("bind","type",j);
std::string IP = Conf->ReadValue("bind","address",j);
long Port = Conf->ReadInteger("bind","port",j,true);
- if (IP == "*")
+ if (Type == "servers")
{
- IP = "";
- }
- TreeSocket* listener = new TreeSocket(IP.c_str(),Port,true,10);
- if (listener->GetState() == I_LISTENING)
- {
- Srv->AddSocket(listener);
- Bindings.push_back(listener);
- }
- else
- {
- log(DEFAULT,"m_spanningtree: Warning: Failed to bind server port %d",Port);
- listener->Close();
- delete listener;
+ if (IP == "*")
+ {
+ IP = "";
+ }
+ TreeSocket* listener = new TreeSocket(IP.c_str(),Port,true,10);
+ if (listener->GetState() == I_LISTENING)
+ {
+ Srv->AddSocket(listener);
+ Bindings.push_back(listener);
+ }
+ else
+ {
+ log(DEFAULT,"m_spanningtree: Warning: Failed to bind server port %d",Port);
+ listener->Close();
+ delete listener;
+ }
}
}
}