summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-28 17:40:00 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-28 17:40:00 +0000
commitbf0a17da34ed8784edd5bf30e508a97e377ffc5d (patch)
treef094b91d0bdba8ac478fe3346f2b8d82a9f6b5bd /src
parenteb5086504c3d755d81ce6c482cdff5bf7b003fe6 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_spanningtree/treesocket2.cpp16
1 files 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<std::string> p;