]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix previous module mismatch message; "remote" is misleading when sent as an ERROR
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 27 Feb 2009 01:04:57 +0000 (01:04 +0000)
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 27 Feb 2009 01:04:57 +0000 (01:04 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11154 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/m_spanningtree/capab.cpp

index bcf16c760c1ebd861007c74ee2745f1ac5936786..d39e5f4ab80b01b09a449559a74acc19e0367fc0 100644 (file)
@@ -157,19 +157,20 @@ bool TreeSocket::Capab(const std::deque<std::string> &params)
                 */
                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))))