summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-19 18:10:24 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-19 18:10:24 +0000
commit6f89f9cb9084b117e8e5dedb5e4b6179f416f5a8 (patch)
tree82b35fc7e31357778c3582a43d9c7322d541aa61
parent59c1262dc163db54edccd3231a633a287b68c78f (diff)
Check for link tags with undefined ipaddr fields (for drunk admins that typo)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3735 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/m_spanningtree.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index 62f07d70c..71ae7de52 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -2906,14 +2906,18 @@ void ReadConfiguration(bool rebind)
L.HiddenFromStats = Conf->ReadFlag("link","hidden",j);
L.NextConnectTime = time(NULL) + L.AutoConnect;
/* Bugfix by brain, do not allow people to enter bad configurations */
- if ((L.RecvPass != "") && (L.SendPass != "") && (L.Name != "") && (L.Port))
+ if ((L.IPAddr != "") && (L.RecvPass != "") && (L.SendPass != "") && (L.Name != "") && (L.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
{
- if (L.RecvPass == "")
+ if (L.IPAddr == "")
+ {
+ log(DEFAULT,"Invalid configuration for server '%s', IP address not defined!",L.Name.c_str());
+ }
+ else if (L.RecvPass == "")
{
log(DEFAULT,"Invalid configuration for server '%s', recvpass not defined!",L.Name.c_str());
}