Changes in protocols/bee_user.c [9b1d2d6:0ebf919]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/bee_user.c
r9b1d2d6 r0ebf919 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 ); 189 190 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 else195 bu->status = NULL;196 191 197 192 if( bu->status == NULL && ( flags & OPT_MOBILE ) && … … 207 202 g_free( old->status_msg ); 208 203 g_free( old->status ); 209 g_free( old );210 }211 212 /* Same, but only change the away/status message, not any away/online state info. */213 void imcb_buddy_status_msg( struct im_connection *ic, const char *handle, const char *message )214 {215 bee_t *bee = ic->bee;216 bee_user_t *bu, *old;217 218 if( !( bu = bee_user_by_handle( bee, ic, handle ) ) )219 {220 return;221 }222 223 old = g_memdup( bu, sizeof( bee_user_t ) );224 225 bu->status_msg = message && *message ? g_strdup( message ) : NULL;226 227 if( bee->ui->user_status )228 bee->ui->user_status( bee, bu, old );229 230 g_free( old->status_msg );231 204 g_free( old ); 232 205 }
Note: See TracChangeset
for help on using the changeset viewer.