- Timestamp:
- 2010-03-07T00:22:33Z (15 years ago)
- Branches:
- master
- Children:
- 68198e9
- Parents:
- 34fbbf9
- Location:
- protocols
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/nogaim.c
r34fbbf9 r58adb7e 2 2 * BitlBee -- An IRC to other IM-networks gateway * 3 3 * * 4 * Copyright 2002-20 06Wilmer van der Gaast and others *4 * Copyright 2002-2010 Wilmer van der Gaast and others * 5 5 \********************************************************************/ 6 6 … … 268 268 ic->flags |= OPT_LOGGED_IN; 269 269 270 /* Also necessary when we're not away, at least for some of the 271 protocols. */ 272 imc_set_away( ic, u->away ); 270 /* Necessary to send initial presence status, even if we're not away. */ 271 imc_away_send_update( ic ); 273 272 274 273 /* Apparently we're connected successfully, so reset the … … 1072 1071 static char *imc_away_state_find( GList *gcm, char *away, char **message ); 1073 1072 1074 int imc_set_away( struct im_connection *ic, char *away ) 1075 { 1076 char *s = NULL, *msg = away; 1077 1073 int imc_away_send_update( struct im_connection *ic ) 1074 { 1075 char *away, *msg; 1076 1077 away = set_getstr( &ic->acc->set, "away" ) ? 1078 : set_getstr( &ic->irc->set, "away" ); 1078 1079 if( away && *away ) 1079 1080 { 1080 1081 GList *m = ic->acc->prpl->away_states( ic ); 1081 s = imc_away_state_find( m, away, &msg ) ? : m->data; 1082 } 1083 1084 if( set_getbool( &ic->irc->set, "debug" ) ) 1085 imcb_log( ic, "Setting away state to %s", s ); 1086 1087 ic->acc->prpl->set_away( ic, s, ic->acc->flags & ACC_FLAG_AWAY_MESSAGE ? msg : NULL ); 1082 msg = ic->acc->flags & ACC_FLAG_AWAY_MESSAGE ? away : NULL; 1083 away = imc_away_state_find( m, away, &msg ) ? : m->data; 1084 } 1085 else if( ic->acc->flags & ACC_FLAG_STATUS_MESSAGE ) 1086 { 1087 away = NULL; 1088 msg = set_getstr( &ic->acc->set, "status" ) ? 1089 : set_getstr( &ic->irc->set, "status" ); 1090 } 1091 1092 ic->acc->prpl->set_away( ic, away, msg ); 1088 1093 1089 1094 return 1; -
protocols/nogaim.h
r34fbbf9 r58adb7e 314 314 315 315 /* Actions, or whatever. */ 316 int imc_ set_away( struct im_connection *ic, char *away);316 int imc_away_send_update( struct im_connection *ic ); 317 317 int imc_buddy_msg( struct im_connection *ic, char *handle, char *msg, int flags ); 318 318 int imc_chat_msg( struct groupchat *c, char *msg, int flags );
Note: See TracChangeset
for help on using the changeset viewer.