diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-04 12:43:13 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-04 12:43:13 +0000 |
commit | df02679c15f8d9966e8a14d6ae1077ec66f1b6b8 (patch) | |
tree | 4f17bf04105fe8b4536933cbf05ccf5ef4d7d0b9 /src | |
parent | 6216ca471818d39fd92fe17587d4b94173cd8d08 (diff) |
Tweaked nick collision code
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2134 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_spanningtree.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 5eab7ca34..9484c282b 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -629,8 +629,12 @@ class TreeSocket : public InspSocket { // nick collision log(DEBUG,"Nick collision on %s!%s@%s: %lu %lu",tempnick,ident.c_str(),host.c_str(),(unsigned long)age,(unsigned long)iter->second->age); - this->WriteLine(":"+Srv->GetServerName()+" KILL "+tempnick+" :Nickname collision"); - return true; + if (iter->second->age > age) + { + // ours is older than theirs, ours stays. Ignore their NICK, send KILL. + this->WriteLine(":"+Srv->GetServerName()+" KILL "+tempnick+" :Nickname collision"); + return true; + } } clientlist[tempnick] = new userrec(); |