From e75c523e594f56fcd876213a2042cb3a45822f97 Mon Sep 17 00:00:00 2001 From: danieldg Date: Fri, 27 Feb 2009 01:04:57 +0000 Subject: Fix previous module mismatch message; "remote" is misleading when sent as an ERROR git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11154 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/capab.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_spanningtree/capab.cpp b/src/modules/m_spanningtree/capab.cpp index bcf16c760..d39e5f4ab 100644 --- a/src/modules/m_spanningtree/capab.cpp +++ b/src/modules/m_spanningtree/capab.cpp @@ -157,19 +157,20 @@ bool TreeSocket::Capab(const std::deque ¶ms) */ if ((this->ModuleList != this->MyCapabilities()) && (this->ModuleList.length())) { - std::string diff = ListDifference(this->ModuleList, this->MyCapabilities()); - if (!diff.length()) + std::string diffIneed = ListDifference(this->ModuleList, this->MyCapabilities()); + std::string diffUneed = ListDifference(this->MyCapabilities(), this->ModuleList); + if (diffIneed.length() == 0 && diffUneed.length() == 0) { - diff = "your server:" + ListDifference(this->MyCapabilities(), this->ModuleList); + reason = "Module list in CAPAB is not alphabetically ordered, cannot compare lists."; } else { - diff = "the remote server:" + diff; + reason = "Modules incorrectly matched on these servers."; + if (diffIneed.length()) + reason += " Not loaded here:" + diffIneed; + if (diffUneed.length()) + reason += " Not loaded there:" + diffUneed; } - if (diff.length() == 12) - reason = "Module list in CAPAB is not alphabetically ordered, cannot compare lists."; - else - reason = "Modules loaded on these servers are not correctly matched, these modules are not loaded on " + diff; } if (((this->CapKeys.find("IP6SUPPORT") == this->CapKeys.end()) && (ip6support)) || ((this->CapKeys.find("IP6SUPPORT") != this->CapKeys.end()) && (this->CapKeys.find("IP6SUPPORT")->second != ConvToStr(ip6support)))) -- cgit v1.2.3