From: Michael Poole Date: Tue, 8 Jul 2008 02:16:16 +0000 (-0400) Subject: Properly handle collisions during burst with persistent local clients. X-Git-Tag: v1.4.0-rc3~5 X-Git-Url: http://git.pk910.de/?p=srvx.git;a=commitdiff_plain;h=f36f9237769e06022cf0820e036ce3a9b284cb72 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. --- 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 {