Changeset 9052bc1 for irc_channel.c


Ignore:
Timestamp:
2010-06-30T23:15:44Z (9 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
06f9548
Parents:
d7f8500
Message:

Flush channels when the user leaves them. Also, don't update a control
channel if the user isn't in it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc_channel.c

    rd7f8500 r9052bc1  
    241241                if( ic->flags & IRC_CHANNEL_TEMP )
    242242                        irc_channel_free_soon( ic );
     243                else
     244                {
     245                        /* Flush userlist now. The user won't see it anyway. */
     246                        while( ic->users )
     247                        {
     248                                g_free( ic->users->data );
     249                                ic->users = g_slist_remove( ic->users, ic->users->data );
     250                        }
     251                        irc_channel_add_user( ic, ic->irc->root );
     252                }
    243253        }
    244254       
     
    582592        set_del( &ic->set, "fill_by" );
    583593        set_del( &ic->set, "group" );
     594        set_del( &ic->set, "protocol" );
    584595       
    585596        g_free( icc );
Note: See TracChangeset for help on using the changeset viewer.