Changeset 6bbb939 for protocols/nogaim.c
- Timestamp:
- 2007-04-16T04:01:13Z (17 years ago)
- Branches:
- master
- Children:
- cfc8d58
- Parents:
- 84b045d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/nogaim.c
r84b045d r6bbb939 187 187 188 188 if( ( g_strcasecmp( set_getstr( &ic->irc->set, "strip_html" ), "always" ) == 0 ) || 189 ( ( ic->flags & OPT_ CONN_HTML ) && set_getbool( &ic->irc->set, "strip_html" ) ) )189 ( ( ic->flags & OPT_DOES_HTML ) && set_getbool( &ic->irc->set, "strip_html" ) ) ) 190 190 strip_html( text ); 191 191 … … 494 494 /* server.c */ 495 495 496 void serv_got_update( struct im_connection *ic, char *handle, int loggedin, int evil, time_t signon, time_t idle, int type, guint caps)496 void imcb_buddy_status( struct im_connection *ic, const char *handle, int flags, const char *state, const char *message ) 497 497 { 498 498 user_t *u; 499 499 int oa, oo; 500 500 501 u = user_findhandle( ic, handle );501 u = user_findhandle( ic, (char*) handle ); 502 502 503 503 if( !u ) … … 505 505 if( g_strcasecmp( set_getstr( &ic->irc->set, "handle_unknown" ), "add" ) == 0 ) 506 506 { 507 add_buddy( ic, NULL, handle, NULL );508 u = user_findhandle( ic, handle );507 add_buddy( ic, NULL, (char*) handle, NULL ); 508 u = user_findhandle( ic, (char*) handle ); 509 509 } 510 510 else … … 512 512 if( set_getbool( &ic->irc->set, "debug" ) || g_strcasecmp( set_getstr( &ic->irc->set, "handle_unknown" ), "ignore" ) != 0 ) 513 513 { 514 imcb_log( ic, "serv_got_update() for handle %s:", handle ); 515 imcb_log( ic, "loggedin = %d, type = %d", loggedin, type ); 514 imcb_log( ic, "imcb_buddy_status() for unknown handle %s:", handle ); 515 imcb_log( ic, "flags = %d, state = %s, message = %s", flags, 516 state ? state : "NULL", message ? message : "NULL" ); 516 517 } 517 518 518 519 return; 519 520 } 520 /* Why did we have this here....521 return; */522 521 } 523 522 … … 531 530 } 532 531 533 if( loggedin&& !u->online )532 if( ( flags & OPT_LOGGED_IN ) && !u->online ) 534 533 { 535 534 irc_spawn( ic->irc, u ); 536 535 u->online = 1; 537 536 } 538 else if( ! loggedin&& u->online )537 else if( !( flags & OPT_LOGGED_IN ) && u->online ) 539 538 { 540 539 struct groupchat *c; … … 545 544 /* Remove him/her from the conversations to prevent PART messages after he/she QUIT already */ 546 545 for( c = ic->conversations; c; c = c->next ) 547 remove_chat_buddy_silent( c, handle ); 548 } 549 550 if( ( type & UC_UNAVAILABLE ) && ( strcmp( ic->acc->prpl->name, "oscar" ) == 0 || strcmp( ic->acc->prpl->name, "icq" ) == 0 ) ) 551 { 552 u->away = g_strdup( "Away" ); 553 } 554 else if( ( type & UC_UNAVAILABLE ) && ic->acc->prpl->get_status_string ) 555 { 556 u->away = g_strdup( ic->acc->prpl->get_status_string( ic, type ) ); 557 } 558 else 559 u->away = NULL; 546 remove_chat_buddy_silent( c, (char*) handle ); 547 } 548 549 if( flags & OPT_AWAY ) 550 { 551 if( state && message ) 552 { 553 u->away = g_strdup_printf( "%s (%s)", state, message ); 554 } 555 else if( state ) 556 { 557 u->away = g_strdup( state ); 558 } 559 else if( message ) 560 { 561 u->away = g_strdup( message ); 562 } 563 else 564 { 565 u->away = g_strdup( "Away" ); 566 } 567 } 568 /* else waste_any_state_information_for_now(); */ 560 569 561 570 /* LISPy... */ … … 612 621 613 622 if( ( g_strcasecmp( set_getstr( &ic->irc->set, "strip_html" ), "always" ) == 0 ) || 614 ( ( ic->flags & OPT_ CONN_HTML ) && set_getbool( &ic->irc->set, "strip_html" ) ) )623 ( ( ic->flags & OPT_DOES_HTML ) && set_getbool( &ic->irc->set, "strip_html" ) ) ) 615 624 strip_html( msg ); 616 625 … … 718 727 719 728 if( ( g_strcasecmp( set_getstr( &ic->irc->set, "strip_html" ), "always" ) == 0 ) || 720 ( ( ic->flags & OPT_ CONN_HTML ) && set_getbool( &ic->irc->set, "strip_html" ) ) )729 ( ( ic->flags & OPT_DOES_HTML ) && set_getbool( &ic->irc->set, "strip_html" ) ) ) 721 730 strip_html( msg ); 722 731 … … 925 934 int st; 926 935 927 if( ( ic->flags & OPT_ CONN_HTML ) && ( g_strncasecmp( msg, "<html>", 6 ) != 0 ) )936 if( ( ic->flags & OPT_DOES_HTML ) && ( g_strncasecmp( msg, "<html>", 6 ) != 0 ) ) 928 937 { 929 938 buf = escape_html( msg ); … … 941 950 char *buf = NULL; 942 951 943 if( ( c->ic->flags & OPT_ CONN_HTML ) && ( g_strncasecmp( msg, "<html>", 6 ) != 0 ) )952 if( ( c->ic->flags & OPT_DOES_HTML ) && ( g_strncasecmp( msg, "<html>", 6 ) != 0 ) ) 944 953 { 945 954 buf = escape_html( msg );
Note: See TracChangeset
for help on using the changeset viewer.