src/protocols/yahoo/yahoo.c

changeset 13688
240e5b90adb4
parent 13559
c7256daef931
child 13707
07610f141c91
equal deleted inserted replaced
13687:c432ca78c271 13688:240e5b90adb4
151 break; 151 break;
152 case YAHOO_STATUS_INVISIBLE: /* this should never happen? */ 152 case YAHOO_STATUS_INVISIBLE: /* this should never happen? */
153 status = YAHOO_STATUS_TYPE_INVISIBLE; 153 status = YAHOO_STATUS_TYPE_INVISIBLE;
154 break; 154 break;
155 case YAHOO_STATUS_CUSTOM: 155 case YAHOO_STATUS_CUSTOM:
156 case YAHOO_STATUS_IDLE:
156 if (!f->away) 157 if (!f->away)
157 status = YAHOO_STATUS_TYPE_AVAILABLE; 158 status = YAHOO_STATUS_TYPE_AVAILABLE;
158 else 159 else
159 status = YAHOO_STATUS_TYPE_AWAY; 160 status = YAHOO_STATUS_TYPE_AWAY;
160 break;
161 case YAHOO_STATUS_IDLE:
162 status = YAHOO_STATUS_TYPE_AVAILABLE;
163 break; 161 break;
164 default: 162 default:
165 gaim_debug_warning("yahoo", "Warning, unknown status %d\n", f->status); 163 gaim_debug_warning("yahoo", "Warning, unknown status %d\n", f->status);
166 break; 164 break;
167 } 165 }
3235 struct yahoo_data *yd = gc->proto_data; 3233 struct yahoo_data *yd = gc->proto_data;
3236 struct yahoo_packet *pkt = NULL; 3234 struct yahoo_packet *pkt = NULL;
3237 char *msg = NULL, *msg2 = NULL; 3235 char *msg = NULL, *msg2 = NULL;
3238 GaimStatus *status = NULL; 3236 GaimStatus *status = NULL;
3239 3237
3240 if (idle && yd->current_status != YAHOO_STATUS_IDLE) 3238 if (idle && yd->current_status != YAHOO_STATUS_CUSTOM)
3241 yd->current_status = YAHOO_STATUS_IDLE; 3239 yd->current_status = YAHOO_STATUS_IDLE;
3242 else if (!idle && yd->current_status == YAHOO_STATUS_IDLE) { 3240 else if (!idle && yd->current_status == YAHOO_STATUS_IDLE) {
3243 status = gaim_presence_get_active_status(gaim_account_get_presence(gaim_connection_get_account(gc))); 3241 status = gaim_presence_get_active_status(gaim_account_get_presence(gaim_connection_get_account(gc)));
3244 yd->current_status = get_yahoo_status_from_gaim_status(status); 3242 yd->current_status = get_yahoo_status_from_gaim_status(status);
3245 } 3243 }

mercurial