]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/uid.cpp
Fix excessive snomask sending on fitler add/removal
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / uid.cpp
index 0e529ee376a4bd20122c0a743654200fb26e921e..72fd66f95d8d03e268083945490a877ee366eb58 100644 (file)
@@ -2,8 +2,8 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
  *            the file COPYING for details.
@@ -71,10 +71,10 @@ bool TreeSocket::ParseUID(const std::string &source, std::deque<std::string> &pa
                /*
                 * Nick collision.
                 */
-               ServerInstance->Logs->Log("m_spanningtree",DEBUG,"*** Collision on %s", params[2].c_str());
                int collide = this->DoCollision(iter->second, age_t, params[5], params[8], params[0]);
+               ServerInstance->Logs->Log("m_spanningtree",DEBUG,"*** Collision on %s, collide=%d", params[2].c_str(), collide);
 
-               if (collide == 2)
+               if (collide != 1)
                {
                        /* remote client changed, make sure we change their nick for the hash too */
                        params[2] = params[0];
@@ -137,7 +137,7 @@ bool TreeSocket::ParseUID(const std::string &source, std::deque<std::string> &pa
                                        mh->OnModeChange(_new, _new, NULL, params[paramptr++], true);
                                else
                                {
-                                       this->SendError("Broken UID command, expected a parameter for user mode '"+ConvToStr(*v)+"' but there aren't enough parameters in the command!");
+                                       this->SendError(std::string("Broken UID command, expected a parameter for user mode '")+(*v)+"' but there aren't enough parameters in the command!");
                                        return false;
                                }
                        }
@@ -148,8 +148,7 @@ bool TreeSocket::ParseUID(const std::string &source, std::deque<std::string> &pa
                }
                else
                {
-                       // XXX: to avoid this, we really need to send u/cmodes in CAPAB like we do 005 (I've thought this a long time anyway..)
-                       this->SendError("Warning: Broken UID command, unknown user mode '"+ConvToStr(*v)+"' in the mode string! (mismatched modules/bug?)");
+                       this->SendError(std::string("Warning: Broken UID command, unknown user mode '")+(*v)+"' in the mode string! (mismatched module?)");
                        return false;
                }
        }