summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/treeserver.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-27 21:57:00 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-27 21:57:00 +0000
commit81007f78935f9c39930c94acec00afb4271b0dfe (patch)
tree5b937496c586e9c42383e70e1e73f39145668fff /src/modules/m_spanningtree/treeserver.cpp
parent87f6079b5ca4038201319ad0a6241dc2f2cb310e (diff)
Add bool TreeSocket::DuplicateID(), as its not safe to throw then try and squit that server :p
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7922 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree/treeserver.cpp')
-rw-r--r--src/modules/m_spanningtree/treeserver.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/modules/m_spanningtree/treeserver.cpp b/src/modules/m_spanningtree/treeserver.cpp
index 1d29bd3c2..4204c2224 100644
--- a/src/modules/m_spanningtree/treeserver.cpp
+++ b/src/modules/m_spanningtree/treeserver.cpp
@@ -36,7 +36,7 @@ TreeServer::TreeServer(SpanningTreeUtilities* Util, InspIRCd* Instance, const st
VersionString.clear();
UserCount = OperCount = 0;
rtt = LastPing = 0;
- Hidden = false;
+ Hidden = DupError = false;
VersionString = ServerInstance->GetVersionString();
SetID(id);
}
@@ -56,7 +56,7 @@ TreeServer::TreeServer(SpanningTreeUtilities* Util, InspIRCd* Instance, std::str
Route = NULL;
Socket = NULL; /* Fix by brain */
rtt = LastPing = 0;
- Hidden = false;
+ Hidden = DupError = false;
AddHashEntry();
SetID(id);
}
@@ -72,6 +72,7 @@ TreeServer::TreeServer(SpanningTreeUtilities* Util, InspIRCd* Instance, std::str
UserCount = OperCount = 0;
this->SetNextPingTime(time(NULL) + Utils->PingFreq);
this->SetPingFlag();
+ DupError = false;
rtt = LastPing = 0;
/* find the 'route' for this server (e.g. the one directly connected
* to the local server, which we can use to reach it)
@@ -141,7 +142,12 @@ void TreeServer::SetID(const std::string &id)
if (iter == Utils->sidlist.end())
Utils->sidlist[sid] = this;
else
- throw CoreException("Server ID '"+id+"' already exists!");
+ DupError = true;
+}
+
+bool TreeServer::DuplicateID()
+{
+ return DupError;
}
int TreeServer::QuitUsers(const std::string &reason)