diff options
Diffstat (limited to 'src/modules/m_spanningtree.cpp')
-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]; |