Changes in account.c [286b28e:823de9d]
Legend:
- Unmodified
- Added
- Removed
-
account.c
r286b28e r823de9d 2 2 * BitlBee -- An IRC to other IM-networks gateway * 3 3 * * 4 * Copyright 2002-20 10Wilmer van der Gaast and others *4 * Copyright 2002-2004 Wilmer van der Gaast and others * 5 5 \********************************************************************/ 6 6 … … 27 27 #include "bitlbee.h" 28 28 #include "account.h" 29 #include "chat.h"30 29 31 30 account_t *account_add( irc_t *irc, struct prpl *prpl, char *user, char *pass ) … … 55 54 s = set_add( &a->set, "auto_reconnect", "true", set_eval_bool, a ); 56 55 57 s = set_add( &a->set, "nick_source", "handle", NULL, a );58 59 56 s = set_add( &a->set, "password", NULL, set_eval_account, a ); 60 57 s->flags |= ACC_SET_NOSAVE | SET_NULL_OK; … … 71 68 prpl->init( a ); 72 69 73 s = set_add( &a->set, "away", NULL, set_eval_account, a ); 74 s->flags |= SET_NULL_OK; 75 76 if( a->flags & ACC_FLAG_STATUS_MESSAGE ) 77 { 78 s = set_add( &a->set, "status", NULL, set_eval_account, a ); 79 s->flags |= SET_NULL_OK; 80 } 81 82 return a; 70 return( a ); 83 71 } 84 72 … … 132 120 133 121 acc->auto_connect = bool2int( value ); 134 return value;135 }136 else if( strcmp( set->key, "away" ) == 0 ||137 strcmp( set->key, "status" ) == 0 )138 {139 if( acc->ic && acc->ic->flags & OPT_LOGGED_IN )140 {141 /* If we're currently on-line, set the var now already142 (bit of a hack) and send an update. */143 g_free( set->value );144 set->value = g_strdup( value );145 146 imc_away_send_update( acc->ic );147 }148 149 122 return value; 150 123 } … … 217 190 { 218 191 account_t *a, *l = NULL; 219 struct chat *c, *nc;220 192 221 193 if( acc->ic ) … … 230 202 else 231 203 irc->accounts = a->next; 232 233 for( c = irc->chatrooms; c; c = nc )234 {235 nc = c->next;236 if( acc == c->acc )237 chat_del( irc, c );238 }239 204 240 205 while( a->set ) … … 293 258 p->max = 86400; 294 259 295 /* Format: /[0-9]+([*+][0-9]+(<[0-9+]) ?)?/ */260 /* Format: /[0-9]+([*+][0-9]+(<[0-9+]))/ */ 296 261 while( *value && isdigit( *value ) ) 297 262 p->start = p->start * 10 + *value++ - '0';
Note: See TracChangeset
for help on using the changeset viewer.