Changeset 6bbb939 for protocols/yahoo
- Timestamp:
- 2007-04-16T04:01:13Z (18 years ago)
- Branches:
- master
- Children:
- cfc8d58
- Parents:
- 84b045d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/yahoo/yahoo.c
r84b045d r6bbb939 293 293 } 294 294 295 static char *byahoo_get_status_string( struct im_connection *ic, int stat )296 {297 enum yahoo_status a = stat >> 1;298 299 switch (a)300 {301 case YAHOO_STATUS_BRB:302 return "Be Right Back";303 case YAHOO_STATUS_BUSY:304 return "Busy";305 case YAHOO_STATUS_NOTATHOME:306 return "Not At Home";307 case YAHOO_STATUS_NOTATDESK:308 return "Not At Desk";309 case YAHOO_STATUS_NOTINOFFICE:310 return "Not In Office";311 case YAHOO_STATUS_ONPHONE:312 return "On Phone";313 case YAHOO_STATUS_ONVACATION:314 return "On Vacation";315 case YAHOO_STATUS_OUTTOLUNCH:316 return "Out To Lunch";317 case YAHOO_STATUS_STEPPEDOUT:318 return "Stepped Out";319 case YAHOO_STATUS_INVISIBLE:320 return "Invisible";321 case YAHOO_STATUS_CUSTOM:322 return "Away";323 case YAHOO_STATUS_IDLE:324 return "Idle";325 case YAHOO_STATUS_OFFLINE:326 return "Offline";327 case YAHOO_STATUS_NOTIFY:328 return "Notify";329 default:330 return "Away";331 }332 }333 334 295 static void byahoo_chat_send( struct groupchat *c, char *message, int flags ) 335 296 { … … 393 354 ret->add_buddy = byahoo_add_buddy; 394 355 ret->remove_buddy = byahoo_remove_buddy; 395 ret->get_status_string = byahoo_get_status_string;396 356 ret->send_typing = byahoo_send_typing; 397 357 … … 586 546 { 587 547 struct im_connection *ic = byahoo_get_ic_by_id( id ); 588 589 serv_got_update( ic, who, stat != YAHOO_STATUS_OFFLINE, 0, 0, 590 ( stat == YAHOO_STATUS_IDLE ) ? away : 0, 591 ( stat != YAHOO_STATUS_AVAILABLE ) | ( stat << 1 ), 0 ); 548 char *state_string = NULL; 549 int flags = OPT_LOGGED_IN; 550 551 if( away ) 552 flags |= OPT_AWAY; 553 554 switch (stat) 555 { 556 case YAHOO_STATUS_BRB: 557 state_string = "Be Right Back"; 558 break; 559 case YAHOO_STATUS_BUSY: 560 state_string = "Busy"; 561 break; 562 case YAHOO_STATUS_NOTATHOME: 563 state_string = "Not At Home"; 564 break; 565 case YAHOO_STATUS_NOTATDESK: 566 state_string = "Not At Desk"; 567 break; 568 case YAHOO_STATUS_NOTINOFFICE: 569 state_string = "Not In Office"; 570 break; 571 case YAHOO_STATUS_ONPHONE: 572 state_string = "On Phone"; 573 break; 574 case YAHOO_STATUS_ONVACATION: 575 state_string = "On Vacation"; 576 break; 577 case YAHOO_STATUS_OUTTOLUNCH: 578 state_string = "Out To Lunch"; 579 break; 580 case YAHOO_STATUS_STEPPEDOUT: 581 state_string = "Stepped Out"; 582 break; 583 case YAHOO_STATUS_INVISIBLE: 584 state_string = "Invisible"; 585 break; 586 case YAHOO_STATUS_CUSTOM: 587 state_string = "Away"; 588 break; 589 case YAHOO_STATUS_IDLE: 590 state_string = "Idle"; 591 break; 592 case YAHOO_STATUS_OFFLINE: 593 state_string = "Offline"; 594 flags = 0; 595 break; 596 case YAHOO_STATUS_NOTIFY: 597 state_string = "Notify"; 598 break; 599 } 600 601 imcb_buddy_status( ic, who, flags, state_string, msg ); 602 603 /* Not implemented yet... 604 if( stat == YAHOO_STATUS_IDLE ) 605 imcb_buddy_times( ic, who, 0, away ); 606 */ 592 607 } 593 608
Note: See TracChangeset
for help on using the changeset viewer.