- Timestamp:
- 2010-06-26T21:26:41Z (14 years ago)
- Branches:
- master
- Children:
- e907683
- Parents:
- 41d415b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
irc_im.c
r41d415b r92c8d41 34 34 { 35 35 irc_user_t *iu; 36 irc_t *irc = (irc_t*) bee->ui_data; 36 37 char nick[MAX_NICK_LENGTH+1], *s; 37 38 … … 39 40 strcpy( nick, nick_get( bu->ic->acc, bu->handle ) ); 40 41 41 bu->ui_data = iu = irc_user_new( (irc_t*) bee->ui_data, nick );42 bu->ui_data = iu = irc_user_new( irc, nick ); 42 43 iu->bu = bu; 43 44 … … 63 64 } 64 65 65 if( set_getbool( &bee->set, "private" ) )66 iu->flags |= IRC_USER_PRIVATE;67 68 66 if( bu->flags & BEE_USER_LOCAL ) 69 67 { … … 71 69 72 70 if( strcmp( s, "add_private" ) == 0 ) 73 iu-> flags |= IRC_USER_PRIVATE;71 iu->last_channel = NULL; 74 72 else if( strcmp( s, "add_channel" ) == 0 ) 75 iu-> flags &= ~IRC_USER_PRIVATE;73 iu->last_channel = irc->default_channel; 76 74 } 77 75 78 76 iu->f = &irc_user_im_funcs; 79 //iu->last_typing_notice = 0;80 77 81 78 return TRUE; … … 180 177 { 181 178 irc_t *irc = bee->ui_data; 182 irc_channel_t *ic = irc->default_channel;183 179 irc_user_t *iu = (irc_user_t *) bu->ui_data; 184 180 char *dst, *prefix = NULL; … … 188 184 ts = irc_format_timestamp( irc, sent_at ); 189 185 190 if( iu->flags & IRC_USER_PRIVATE ) 186 if( iu->last_channel ) 187 { 188 dst = iu->last_channel->name; 189 prefix = g_strdup_printf( "%s%s%s", irc->user->nick, set_getstr( &bee->set, "to_char" ), ts ? : "" ); 190 } 191 else 191 192 { 192 193 dst = irc->user->nick; 193 194 prefix = ts; 194 195 ts = NULL; 195 }196 else197 {198 dst = ic->name;199 prefix = g_strdup_printf( "%s%s%s", irc->user->nick, set_getstr( &bee->set, "to_char" ), ts ? : "" );200 196 } 201 197
Note: See TracChangeset
for help on using the changeset viewer.