Changeset 18da20b
- Timestamp:
- 2010-06-06T00:33:33Z (15 years ago)
- Branches:
- master
- Children:
- 1f0224c
- Parents:
- c1a8a16
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
irc.h
rc1a8a16 r18da20b 222 222 int irc_channel_free( irc_channel_t *ic ); 223 223 int irc_channel_add_user( irc_channel_t *ic, irc_user_t *iu ); 224 int irc_channel_del_user( irc_channel_t *ic, irc_user_t *iu );224 int irc_channel_del_user( irc_channel_t *ic, irc_user_t *iu, gboolean silent, const char *msg ); 225 225 irc_channel_user_t *irc_channel_has_user( irc_channel_t *ic, irc_user_t *iu ); 226 226 int irc_channel_set_topic( irc_channel_t *ic, const char *topic, const irc_user_t *who ); -
irc_channel.c
rc1a8a16 r18da20b 81 81 82 82 if( ic->flags & IRC_CHANNEL_JOINED ) 83 irc_channel_del_user( ic, irc->user );83 irc_channel_del_user( ic, irc->user, FALSE, "Cleaning up channel" ); 84 84 85 85 irc->channels = g_slist_remove( irc->channels, ic ); … … 142 142 } 143 143 144 int irc_channel_del_user( irc_channel_t *ic, irc_user_t *iu )144 int irc_channel_del_user( irc_channel_t *ic, irc_user_t *iu, gboolean silent, const char *msg ) 145 145 { 146 146 irc_channel_user_t *icu; … … 152 152 g_free( icu ); 153 153 154 if( ic->flags & IRC_CHANNEL_JOINED )155 irc_send_part( ic, iu, "");154 if( ic->flags & IRC_CHANNEL_JOINED && !silent ) 155 irc_send_part( ic, iu, msg ); 156 156 157 157 if( iu == ic->irc->user ) -
irc_commands.c
rc1a8a16 r18da20b 177 177 irc_send_num( irc, 403, "%s :No such channel", cmd[1] ); 178 178 } 179 else if( irc_channel_del_user( ic, irc->user ) )179 else if( irc_channel_del_user( ic, irc->user, FALSE, cmd[2] ) ) 180 180 { 181 181 if( ic->f->part ) -
irc_im.c
rc1a8a16 r18da20b 160 160 if( !show ) 161 161 { 162 irc_channel_del_user( ic, iu );162 irc_channel_del_user( ic, iu, FALSE, NULL ); 163 163 } 164 164 else … … 368 368 /* irc_channel_free( ic ); */ 369 369 370 irc_channel_del_user( ic, ic->irc->user );370 irc_channel_del_user( ic, ic->irc->user, FALSE, "Chatroom closed by server" ); 371 371 ic->data = NULL; 372 372 … … 412 412 irc_t *irc = bee->ui_data; 413 413 414 irc_channel_del_user( c->ui_data, bu == bee->user ? irc->user : bu->ui_data );414 irc_channel_del_user( c->ui_data, bu == bee->user ? irc->user : bu->ui_data, FALSE, NULL ); 415 415 416 416 return TRUE; -
irc_send.c
rc1a8a16 r18da20b 150 150 void irc_send_part( irc_channel_t *ic, irc_user_t *iu, const char *reason ) 151 151 { 152 irc_write( ic->irc, ":%s!%s@%s PART %s :%s", iu->nick, iu->user, iu->host, ic->name, reason );152 irc_write( ic->irc, ":%s!%s@%s PART %s :%s", iu->nick, iu->user, iu->host, ic->name, reason ? : "" ); 153 153 } 154 154 -
irc_user.c
rc1a8a16 r18da20b 58 58 59 59 for( l = irc->channels; l; l = l->next ) 60 irc_channel_del_user( (irc_channel_t*) l->data, iu );60 irc_channel_del_user( (irc_channel_t*) l->data, iu, FALSE, NULL ); 61 61 62 62 g_free( iu->nick );
Note: See TracChangeset
for help on using the changeset viewer.