Changes in protocols/nogaim.c [3e1ef92c:449a51d]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/nogaim.c
r3e1ef92c r449a51d 98 98 void register_protocol (struct prpl *p) 99 99 { 100 protocols = g_list_append(protocols, p); 100 int i; 101 gboolean refused = global.conf->protocols != NULL; 102 103 for (i = 0; global.conf->protocols && global.conf->protocols[i]; i++) 104 { 105 if (g_strcasecmp(p->name, global.conf->protocols[i]) == 0) 106 refused = FALSE; 107 } 108 109 if (refused) 110 log_message(LOGLVL_WARNING, "Protocol %s disabled\n", p->name); 111 else 112 protocols = g_list_append(protocols, p); 101 113 } 102 114 … … 371 383 /* list.c */ 372 384 373 void imcb_add_buddy( struct im_connection *ic, c har *handle,char *group )385 void imcb_add_buddy( struct im_connection *ic, const char *handle, const char *group ) 374 386 { 375 387 user_t *u; … … 445 457 } 446 458 447 void imcb_rename_buddy( struct im_connection *ic, c har *handle,char *realname )459 void imcb_rename_buddy( struct im_connection *ic, const char *handle, const char *realname ) 448 460 { 449 461 user_t *u = user_findhandle( ic, handle ); 462 char *set; 450 463 451 464 if( !u || !realname ) return; … … 460 473 imcb_log( ic, "User `%s' changed name to `%s'", u->nick, u->realname ); 461 474 } 462 } 463 464 void imcb_remove_buddy( struct im_connection *ic, char *handle, char *group ) 475 476 set = set_getstr( &ic->acc->set, "nick_source" ); 477 if( strcmp( set, "handle" ) != 0 ) 478 { 479 char *name = g_strdup( realname ); 480 481 if( strcmp( set, "first_name" ) == 0 ) 482 { 483 int i; 484 for( i = 0; name[i] && !isspace( name[i] ); i ++ ) {} 485 name[i] = '\0'; 486 } 487 488 imcb_buddy_nick_hint( ic, handle, name ); 489 490 g_free( name ); 491 } 492 } 493 494 void imcb_remove_buddy( struct im_connection *ic, const char *handle, char *group ) 465 495 { 466 496 user_t *u; … … 472 502 /* Mainly meant for ICQ (and now also for Jabber conferences) to allow IM 473 503 modules to suggest a nickname for a handle. */ 474 void imcb_buddy_nick_hint( struct im_connection *ic, c har *handle,char *nick )504 void imcb_buddy_nick_hint( struct im_connection *ic, const char *handle, const char *nick ) 475 505 { 476 506 user_t *u = user_findhandle( ic, handle ); … … 617 647 oo = u->online; 618 648 619 if( u->away ) 620 { 621 g_free( u->away ); 622 u->away = NULL; 623 } 649 g_free( u->away ); 650 g_free( u->status_msg ); 651 u->away = u->status_msg = NULL; 624 652 625 653 if( ( flags & OPT_LOGGED_IN ) && !u->online ) … … 659 687 } 660 688 } 661 /* else waste_any_state_information_for_now(); */ 689 else 690 { 691 u->status_msg = g_strdup( message ); 692 } 662 693 663 694 /* LISPy... */ … … 684 715 } 685 716 686 void imcb_buddy_msg( struct im_connection *ic, c har *handle, char *msg, uint32_t flags, time_t sent_at )717 void imcb_buddy_msg( struct im_connection *ic, const char *handle, char *msg, uint32_t flags, time_t sent_at ) 687 718 { 688 719 irc_t *irc = ic->irc; … … 817 848 } 818 849 819 void imcb_chat_msg( struct groupchat *c, c har *who, char *msg, uint32_t flags, time_t sent_at )850 void imcb_chat_msg( struct groupchat *c, const char *who, char *msg, uint32_t flags, time_t sent_at ) 820 851 { 821 852 struct im_connection *ic = c->ic; … … 889 920 /* buddy_chat.c */ 890 921 891 void imcb_chat_add_buddy( struct groupchat *b, c har *handle )922 void imcb_chat_add_buddy( struct groupchat *b, const char *handle ) 892 923 { 893 924 user_t *u = user_findhandle( b->ic, handle ); … … 924 955 925 956 /* This function is one BIG hack... :-( EREWRITE */ 926 void imcb_chat_remove_buddy( struct groupchat *b, c har *handle,char *reason )957 void imcb_chat_remove_buddy( struct groupchat *b, const char *handle, const char *reason ) 927 958 { 928 959 user_t *u;
Note: See TracChangeset
for help on using the changeset viewer.