From bf0a17da34ed8784edd5bf30e508a97e377ffc5d Mon Sep 17 00:00:00 2001 From: w00t Date: Tue, 28 Aug 2007 17:40:00 +0000 Subject: [PATCH] Drop nick from incoming client on change collision if incoming client 'loses' the change, and document why we do this git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7955 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/treesocket2.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp index a8451610f..c671ebded 100644 --- a/src/modules/m_spanningtree/treesocket2.cpp +++ b/src/modules/m_spanningtree/treesocket2.cpp @@ -1492,9 +1492,21 @@ bool TreeSocket::ProcessLine(std::string &line) userrec* x = this->Instance->FindNickOnly(params[0]); if ((x) && (x != who)) { + int collideret = 0; /* x is local, who is remote */ - this->DoCollision(x, who->age, who->ident, who->GetIPString(), who->uuid); - return true; + collideret = this->DoCollision(x, who->age, who->ident, who->GetIPString(), who->uuid); + if (collideret != 1) + { + /* + * Remote client lost, or both lost, + * parsing this nickchange would be + * pointless, as the incoming client's + * server will soon recieve SVSNICK to + * change its nick to its UID. :) + * -- w00t + */ + return true; + } /* Old nickname collision logic.. std::deque p; -- 2.39.5