Changeset d93c0eb9 for protocols/bee_user.c
- Timestamp:
- 2010-08-14T12:20:59Z (15 years ago)
- Branches:
- master
- Children:
- 4452e69
- Parents:
- 12767e3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/bee_user.c
r12767e3 rd93c0eb9 187 187 /* TODO(wilmer): OPT_AWAY, or just state == NULL ? */ 188 188 bu->flags = flags; 189 bu->status = g_strdup( ( flags & OPT_AWAY ) && state == NULL ? "Away" : state );190 189 bu->status_msg = g_strdup( message ); 190 if( state && *state ) 191 bu->status = g_strdup( state ); 192 else if( flags & OPT_AWAY ) 193 bu->status = g_strdup( "Away" ); 194 else 195 bu->status = NULL; 191 196 192 197 if( bee->ui->user_status ) … … 198 203 } 199 204 205 /* Same, but only change the away/status message, not any away/online state info. */ 206 void imcb_buddy_status_msg( struct im_connection *ic, const char *handle, const char *message ) 207 { 208 bee_t *bee = ic->bee; 209 bee_user_t *bu, *old; 210 211 if( !( bu = bee_user_by_handle( bee, ic, handle ) ) ) 212 { 213 return; 214 } 215 216 old = g_memdup( bu, sizeof( bee_user_t ) ); 217 218 bu->status_msg = g_strdup( message ); 219 220 if( bee->ui->user_status ) 221 bee->ui->user_status( bee, bu, old ); 222 223 g_free( old->status_msg ); 224 g_free( old ); 225 } 226 200 227 void imcb_buddy_times( struct im_connection *ic, const char *handle, time_t login, time_t idle ) 201 228 {
Note: See TracChangeset
for help on using the changeset viewer.