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

This commit is contained in:
Adam 2012-10-31 13:14:13 -04:00
parent 504caa8ca9
commit c7a5cc0a98

View File

@ -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')))
{
/*