Changeset 006a84f for irc_channel.c


Ignore:
Timestamp:
2010-07-04T20:40:15Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
69b896b, 6c2404e
Parents:
f537044
Message:

Kick the user instead of parting him/her when cleaning up a channel. This is
what the older version also did so that Irssi won't clean up the window.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc_channel.c

    rf537044 r006a84f  
    119119       
    120120        if( ic->flags & IRC_CHANNEL_JOINED )
    121                 irc_channel_del_user( ic, irc->user, FALSE, "Cleaning up channel" );
     121                irc_channel_del_user( ic, irc->user, IRC_CDU_KICK, "Cleaning up channel" );
    122122       
    123123        if( ic->f->_free )
     
    223223}
    224224
    225 int irc_channel_del_user( irc_channel_t *ic, irc_user_t *iu, gboolean silent, const char *msg )
     225int irc_channel_del_user( irc_channel_t *ic, irc_user_t *iu, irc_channel_del_user_type_t type, const char *msg )
    226226{
    227227        irc_channel_user_t *icu;
     
    233233        g_free( icu );
    234234       
    235         if( ic->flags & IRC_CHANNEL_JOINED && !silent )
     235        if( !( ic->flags & IRC_CHANNEL_JOINED ) || type == IRC_CDU_SILENT ) {}
     236                /* Do nothing. The caller should promise it won't screw
     237                   up state of the IRC client. :-) */
     238        else if( type == IRC_CDU_PART )
    236239                irc_send_part( ic, iu, msg );
     240        else if( type == IRC_CDU_KICK )
     241                irc_send_kick( ic, iu, ic->irc->root, msg );
    237242       
    238243        if( iu == ic->irc->user )
Note: See TracChangeset for help on using the changeset viewer.