- Timestamp:
- 2010-04-13T11:38:41Z (15 years ago)
- Branches:
- master
- Children:
- 21c87a7
- Parents:
- 573dab0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/bee.c
r573dab0 r81186cab 1 /********************************************************************\ 2 * BitlBee -- An IRC to other IM-networks gateway * 3 * * 4 * Copyright 2002-2010 Wilmer van der Gaast and others * 5 \********************************************************************/ 6 7 /* Some IM-core stuff */ 8 9 /* 10 This program is free software; you can redistribute it and/or modify 11 it under the terms of the GNU General Public License as published by 12 the Free Software Foundation; either version 2 of the License, or 13 (at your option) any later version. 14 15 This program is distributed in the hope that it will be useful, 16 but WITHOUT ANY WARRANTY; without even the implied warranty of 17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 GNU General Public License for more details. 19 20 You should have received a copy of the GNU General Public License with 21 the Debian GNU/Linux distribution in /usr/share/common-licenses/GPL; 22 if not, write to the Free Software Foundation, Inc., 59 Temple Place, 23 Suite 330, Boston, MA 02111-1307 USA 24 */ 25 26 #define BITLBEE_CORE 1 27 #include "bitlbee.h" 28 29 static char *set_eval_away_status( set_t *set, char *value ); 2 30 3 31 bee_t *bee_new() … … 6 34 set_t *s; 7 35 8 s = set_add( &b->set, "away", NULL, NULL/*set_eval_away_status*/, b );36 s = set_add( &b->set, "away", NULL, set_eval_away_status, b ); 9 37 s->flags |= SET_NULL_OK; 10 38 s = set_add( &b->set, "auto_connect", "true", set_eval_bool, b ); … … 15 43 s->flags |= SET_NULL_OK; 16 44 s = set_add( &b->set, "save_on_quit", "true", set_eval_bool, b ); 17 s = set_add( &b->set, "status", NULL, NULL/*set_eval_away_status*/, b );45 s = set_add( &b->set, "status", NULL, set_eval_away_status, b ); 18 46 s->flags |= SET_NULL_OK; 19 47 s = set_add( &b->set, "strip_html", "true", NULL, b ); … … 46 74 g_free( b ); 47 75 } 76 77 static char *set_eval_away_status( set_t *set, char *value ) 78 { 79 bee_t *bee = set->data; 80 account_t *a; 81 82 g_free( set->value ); 83 set->value = g_strdup( value ); 84 85 for( a = bee->accounts; a; a = a->next ) 86 { 87 struct im_connection *ic = a->ic; 88 89 if( ic && ic->flags & OPT_LOGGED_IN ) 90 imc_away_send_update( ic ); 91 } 92 93 return value; 94 }
Note: See TracChangeset
for help on using the changeset viewer.