From c7a5cc0a98923192420eadc946a3d53bd0b5bdcc Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 31 Oct 2012 13:14:13 -0400 Subject: Don't send quitting users in RPL_NAMREPLY, fixes desyncing clients who join a channel after a user has quit but before they are culled --- src/channels.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/channels.cpp b/src/channels.cpp index 883ae3954..672d46ea9 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -718,7 +718,7 @@ int Channel::CountInvisible() int count = 0; for (UserMembIter i = userlist.begin(); i != userlist.end(); i++) { - if (!(i->first->IsModeSet('i'))) + if (!i->first->quitting && !i->first->IsModeSet('i')) count++; } @@ -793,6 +793,8 @@ void Channel::UserList(User *user) for (UserMembIter i = userlist.begin(); i != userlist.end(); i++) { + if (i->first->quitting) + continue; if ((!has_user) && (i->first->IsModeSet('i'))) { /* -- cgit v1.2.3