From f36f9237769e06022cf0820e036ce3a9b284cb72 Mon Sep 17 00:00:00 2001 From: Michael Poole Date: Mon, 7 Jul 2008 22:16:16 -0400 Subject: [PATCH] Properly handle collisions during burst with persistent local clients. src/proto-p10.c (AddUser): Reorganize if/then/else chain to update a persistent client's timestamp if there is a collision during burst, but not to re-introduce the user immediately. --- src/proto-p10.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/proto-p10.c b/src/proto-p10.c index 8e00b6a..8105b8b 100644 --- a/src/proto-p10.c +++ b/src/proto-p10.c @@ -2084,17 +2084,17 @@ AddUser(struct server* uplink, const char *nick, const char *ident, const char * ignore_user = 0; if ((oldUser = GetUserH(nick))) { if (IsLocal(oldUser) - && (IsService(oldUser) || IsPersistent(oldUser)) - && !uplink->burst) { + && (IsService(oldUser) || IsPersistent(oldUser))) { /* The service should collide the new user off - but not * if the new user is coming in during a burst. (During a * burst, the bursting server will kill either our user -- * triggering a ReintroduceUser() -- or its own.) */ oldUser->timestamp = timestamp - 1; - irc_user(oldUser); - } - if (oldUser->timestamp > timestamp) { + ignore_user = 1; + if (!uplink->burst) + irc_user(oldUser); + } else if (oldUser->timestamp > timestamp) { /* "Old" user is really newer; remove them. */ DelUser(oldUser, 0, 1, "Overruled by older nick"); } else { -- 2.20.1