diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_spanningtree.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 334310b8c..0f10b2de0 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -2139,8 +2139,16 @@ void ReadConfiguration(bool rebind) L.RecvPass = Conf->ReadValue("link","recvpass",j); L.AutoConnect = Conf->ReadInteger("link","autoconnect",j,true); L.NextConnectTime = time(NULL) + L.AutoConnect; - LinkBlocks.push_back(L); - log(DEBUG,"m_spanningtree: Read server %s with host %s:%d",L.Name.c_str(),L.IPAddr.c_str(),L.Port); + /* Bugfix by brain, do not allow people to enter bad configurations */ + if ((recvpass != "") && (sendpass != "") && (Name != "") && (Port)) + { + LinkBlocks.push_back(L); + log(DEBUG,"m_spanningtree: Read server %s with host %s:%d",L.Name.c_str(),L.IPAddr.c_str(),L.Port); + } + else + { + log(DEFAULT,"m_spanningtree: Invalid configuration for server '%s', ignored!",L.Name.c_str()); + } } delete Conf; } |