From 4464121eb232a3ec6049802256012714fe786506 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Sat, 26 Jul 2014 16:00:24 +0200 Subject: m_spanningtree Return a bool from DoCollision() The return value is true if the remote user or both have to change, false if only we have to change --- src/modules/m_spanningtree/nick.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/modules/m_spanningtree/nick.cpp') diff --git a/src/modules/m_spanningtree/nick.cpp b/src/modules/m_spanningtree/nick.cpp index cdec280e1..9f0d78a65 100644 --- a/src/modules/m_spanningtree/nick.cpp +++ b/src/modules/m_spanningtree/nick.cpp @@ -47,8 +47,8 @@ CmdResult CommandNick::HandleRemote(RemoteUser* user, std::vector& { // 'x' is the already existing user using the same nick as params[0] // 'user' is the user trying to change nick to the in use nick - int collideret = Utils->DoCollision(x, TreeServer::Get(user), newts, user->ident, user->GetIPString(), user->uuid); - if (collideret != 1) + bool they_change = Utils->DoCollision(x, TreeServer::Get(user), newts, user->ident, user->GetIPString(), user->uuid); + if (they_change) { // Remote client lost, or both lost, rewrite this nick change as a change to uuid before // calling ChangeNick() and forwarding the message -- cgit v1.3.1-10-gc9f91