Changes in protocols/skype/skype.c [85341dd:a72dc2b]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/skype/skype.c
r85341dd ra72dc2b 2 2 * skype.c - Skype plugin for BitlBee 3 3 * 4 * Copyright (c) 2007, 2008, 2009, 2010, 2011 , 2012by Miklos Vajna <vmiklos@frugalware.org>4 * Copyright (c) 2007, 2008, 2009, 2010, 2011 by Miklos Vajna <vmiklos@frugalware.org> 5 5 * 6 6 * This program is free software; you can redistribute it and/or modify … … 386 386 else if (!strncmp(ptr, "LASTONLINETIMESTAMP ", 20)) 387 387 sd->info_seen = g_strdup(ptr + 20); 388 else if (!strncmp(ptr, "BIRTHDAY ", 9)) 389 sd->info_birthday = g_strdup(ptr + 9); 388 390 else if (!strncmp(ptr, "SEX ", 4)) 389 391 sd->info_sex = g_strdup(ptr + 4); … … 399 401 sd->info_homepage = g_strdup(ptr + 9); 400 402 else if (!strncmp(ptr, "ABOUT ", 6)) { 401 /* Support multiple about lines. */ 402 if (!sd->info_about) 403 sd->info_about = g_strdup(ptr + 6); 404 else { 405 GString *st = g_string_new(sd->info_about); 406 g_string_append_printf(st, "\n%s", ptr + 6); 407 g_free(sd->info_about); 408 sd->info_about = g_strdup(st->str); 409 g_string_free(st, TRUE); 410 } 411 } 412 else if (!strncmp(ptr, "BIRTHDAY ", 9)) { 413 sd->info_birthday = g_strdup(ptr + 9); 403 sd->info_about = g_strdup(ptr + 6); 414 404 415 405 GString *st = g_string_new("Contact Information\n"); … … 420 410 sd->info_fullname); 421 411 g_free(sd->info_fullname); 422 sd->info_fullname = NULL;423 412 } 424 413 if (sd->info_phonehome) { … … 427 416 sd->info_phonehome); 428 417 g_free(sd->info_phonehome); 429 sd->info_phonehome = NULL;430 418 } 431 419 if (sd->info_phoneoffice) { … … 434 422 sd->info_phoneoffice); 435 423 g_free(sd->info_phoneoffice); 436 sd->info_phoneoffice = NULL;437 424 } 438 425 if (sd->info_phonemobile) { … … 441 428 sd->info_phonemobile); 442 429 g_free(sd->info_phonemobile); 443 sd->info_phonemobile = NULL;444 430 } 445 431 g_string_append_printf(st, "Personal Information\n"); … … 449 435 "Contacts: %s\n", sd->info_nrbuddies); 450 436 g_free(sd->info_nrbuddies); 451 sd->info_nrbuddies = NULL;452 437 } 453 438 if (sd->info_tz) { … … 462 447 } 463 448 g_free(sd->info_tz); 464 sd->info_tz = NULL;465 449 } 466 450 if (sd->info_seen) { … … 474 458 } 475 459 g_free(sd->info_seen); 476 sd->info_seen = NULL;477 460 } 478 461 if (sd->info_birthday) { … … 494 477 } 495 478 g_free(sd->info_birthday); 496 sd->info_birthday = NULL;497 479 } 498 480 if (sd->info_sex) { … … 505 487 } 506 488 g_free(sd->info_sex); 507 sd->info_sex = NULL;508 489 } 509 490 if (sd->info_language) { … … 518 499 } 519 500 g_free(sd->info_language); 520 sd->info_language = NULL;521 501 } 522 502 if (sd->info_country) { … … 531 511 } 532 512 g_free(sd->info_country); 533 sd->info_country = NULL;534 513 } 535 514 if (sd->info_province) { … … 538 517 "Region: %s\n", sd->info_province); 539 518 g_free(sd->info_province); 540 sd->info_province = NULL;541 519 } 542 520 if (sd->info_city) { … … 545 523 "City: %s\n", sd->info_city); 546 524 g_free(sd->info_city); 547 sd->info_city = NULL;548 525 } 549 526 if (sd->info_homepage) { … … 552 529 "Homepage: %s\n", sd->info_homepage); 553 530 g_free(sd->info_homepage); 554 sd->info_homepage = NULL;555 531 } 556 532 if (sd->info_about) { … … 559 535 sd->info_about); 560 536 g_free(sd->info_about); 561 sd->info_about = NULL;562 537 } 563 538 imcb_log(ic, "%s", st->str); … … 1471 1446 skype_printf(ic, "GET USER %s TIMEZONE\n", nick); 1472 1447 skype_printf(ic, "GET USER %s LASTONLINETIMESTAMP\n", nick); 1448 skype_printf(ic, "GET USER %s BIRTHDAY\n", nick); 1473 1449 skype_printf(ic, "GET USER %s SEX\n", nick); 1474 1450 skype_printf(ic, "GET USER %s LANGUAGE\n", nick); … … 1478 1454 skype_printf(ic, "GET USER %s HOMEPAGE\n", nick); 1479 1455 skype_printf(ic, "GET USER %s ABOUT\n", nick); 1480 /*1481 * Hack: we query the bithday property which is always a single line,1482 * so we can send the collected properties to the user when we have1483 * this one.1484 */1485 skype_printf(ic, "GET USER %s BIRTHDAY\n", nick);1486 1456 } 1487 1457
Note: See TracChangeset
for help on using the changeset viewer.