diff options
author | burlex <burlex@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-06-14 20:07:45 +0000 |
---|---|---|
committer | burlex <burlex@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-06-14 20:07:45 +0000 |
commit | bbf6f3c5d25b1569e20f6cb59898f33137ba2226 (patch) | |
tree | 4309632012489bfc9b2bb487f99a522c51e8e856 | |
parent | a84438cf93b67ff7e291276706fd7be71e3036d9 (diff) |
+ 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
-rw-r--r-- | src/modules/m_spanningtree/treesocket1.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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<std::string> ¶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"; |