Changeset f0cb961 for protocols/nogaim.c
- Timestamp:
- 2007-04-19T06:03:43Z (17 years ago)
- Branches:
- master
- Children:
- d323394c
- Parents:
- 33dc261
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/nogaim.c
r33dc261 rf0cb961 352 352 /* list.c */ 353 353 354 void add_buddy( struct im_connection *ic, char *group, char *handle, char *realname)354 void imcb_add_buddy( struct im_connection *ic, char *handle, char *group ) 355 355 { 356 356 user_t *u; 357 char nick[MAX_NICK_LENGTH+1]; 358 char *s; 357 char nick[MAX_NICK_LENGTH+1], *s; 359 358 irc_t *irc = ic->irc; 360 361 if( set_getbool( &irc->set, "debug" ) && 0 ) /* This message is too useless */362 imcb_log( ic, "Receiving user add from handle: %s", handle );363 359 364 360 if( user_findhandle( ic, handle ) ) … … 369 365 return; 370 366 371 /* Buddy seems to exist already. Let's ignore this request then... */ 367 /* Buddy seems to exist already. Let's ignore this request then... 368 Eventually subsequent calls to this function *should* be possible 369 when a buddy is in multiple groups. But for now BitlBee doesn't 370 even support groups so let's silently ignore this for now. */ 372 371 } 373 372 374 373 memset( nick, 0, MAX_NICK_LENGTH + 1 ); 375 strcpy( nick, nick_get( ic->acc, handle, realname) );374 strcpy( nick, nick_get( ic->acc, handle, NULL ) ); 376 375 377 376 u = user_add( ic->irc, nick ); 378 377 379 if( !realname || !*realname ) realname = nick;380 u->realname = g_strdup( realname );378 // if( !realname || !*realname ) realname = nick; 379 // u->realname = g_strdup( realname ); 381 380 382 381 if( ( s = strchr( handle, '@' ) ) ) … … 387 386 else if( ic->acc->server ) 388 387 { 389 char *colon; 390 391 if( ( colon = strchr( ic->acc->server, ':' ) ) ) 392 u->host = g_strndup( ic->acc->server, 393 colon - ic->acc->server ); 394 else 395 u->host = g_strdup( ic->acc->server ); 396 388 u->host = g_strdup( ic->acc->server ); 397 389 u->user = g_strdup( handle ); 398 390 … … 415 407 } 416 408 417 struct buddy * find_buddy( struct im_connection *ic, char *handle )409 struct buddy *imcb_find_buddy( struct im_connection *ic, char *handle ) 418 410 { 419 411 static struct buddy b[1]; … … 435 427 436 428 437 void serv_buddy_rename( struct im_connection *ic, char *handle, char *realname )429 void imcb_rename_buddy( struct im_connection *ic, char *handle, char *realname ) 438 430 { 439 431 user_t *u = user_findhandle( ic, handle ); 440 432 441 if( !u ) return;433 if( !u || !realname ) return; 442 434 443 435 if( g_strcasecmp( u->realname, realname ) != 0 ) … … 470 462 { 471 463 data->ic->acc->prpl->add_buddy( data->ic, data->handle, NULL ); 472 add_buddy( data->ic, NULL, data->handle, data->handle );464 /* imcb_add_buddy( data->ic, NULL, data->handle, data->handle ); */ 473 465 474 466 return show_got_added_no( w, data ); … … 505 497 if( g_strcasecmp( set_getstr( &ic->irc->set, "handle_unknown" ), "add" ) == 0 ) 506 498 { 507 add_buddy( ic, NULL, (char*) handle, NULL );499 imcb_add_buddy( ic, (char*) handle, NULL ); 508 500 u = user_findhandle( ic, (char*) handle ); 509 501 } … … 609 601 } 610 602 611 add_buddy( ic, NULL, handle, NULL );603 imcb_add_buddy( ic, handle, NULL ); 612 604 u = user_findhandle( ic, handle ); 613 605 u->is_private = private; … … 779 771 if( !u ) 780 772 { 781 add_buddy( b->ic, NULL, handle, NULL );773 imcb_add_buddy( b->ic, handle, NULL ); 782 774 u = user_findhandle( b->ic, handle ); 783 775 }
Note: See TracChangeset
for help on using the changeset viewer.