From bbf6f3c5d25b1569e20f6cb59898f33137ba2226 Mon Sep 17 00:00:00 2001 From: burlex Date: Thu, 14 Jun 2007 20:07:45 +0000 Subject: + Added a check between servers prefixes at the CAPAB negotiation stage. This will prevent servers with prefixes from linking up in the first place (later on they will get errored out for invalid prefix in FJOIN most likely, but it's better to stop them from linking in the first place) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7312 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/treesocket1.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp index 168ca9e99..b7f3951ce 100644 --- a/src/modules/m_spanningtree/treesocket1.cpp +++ b/src/modules/m_spanningtree/treesocket1.cpp @@ -474,6 +474,9 @@ bool TreeSocket::Capab(const std::deque ¶ms) reason = "Protocol version not specified"; } + if(this->CapKeys.find("PREFIX") != this->CapKeys.end() && this->CapKeys.find("PREFIX")->second != this->Instance->Modes->BuildPrefixes()) + reason = "One or more of the prefixes on the remote server are invalid on this server."; + if (((this->CapKeys.find("HALFOP") == this->CapKeys.end()) && (Instance->Config->AllowHalfop)) || ((this->CapKeys.find("HALFOP") != this->CapKeys.end()) && (this->CapKeys.find("HALFOP")->second != ConvToStr(Instance->Config->AllowHalfop)))) reason = "We don't both have halfop support enabled/disabled identically"; -- cgit v1.2.3