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