diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-01 21:45:47 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-01 21:45:47 +0000 |
commit | 47f66dc6cf78dde18f8984e61a6fa9a822d1d781 (patch) | |
tree | f05e7c36ef8c07ef198d7e3ff7910d313342e720 /src | |
parent | 952b577edce0bf3affc4a0891586115dc3ab5d32 (diff) |
*TEST* nick collision code for NICK change in server link
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3009 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_spanningtree.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index b081b1d4b..8117b7ef9 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -2126,6 +2126,20 @@ class TreeSocket : public InspSocket } if (who) { + if ((command == "NICK") && (params.size() > 0)) + { + /* On nick messages, check that the nick doesnt + * already exist here. If it does, kill their copy, + * and our copy. + */ + userrec* x = Srv->FindNick(params[0]); + if (x) + { + this->WriteLine(":"+Srv->GetServerName()+" KILL "+params[0]+" :Nickname collision ("+prefix+" -> "+params[0]+")"); + Srv->QuitUser(x,"Nickname collision ("+prefix+" -> "+params[0]+")"); + return DoOneToAllButSenderRaw(line,sourceserv,prefix,command,params); + } + } // its a user target = who->server; char* strparams[127]; |