Changes in / [e618d85:441b9dd]


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/skype/skype.c

    re618d85 r441b9dd  
    22 *  skype.c - Skype plugin for BitlBee
    33 *
    4  *  Copyright (c) 2007, 2008, 2009, 2010, 2011, 2012 by Miklos Vajna <vmiklos@frugalware.org>
     4 *  Copyright (c) 2007, 2008, 2009, 2010, 2011 by Miklos Vajna <vmiklos@frugalware.org>
    55 *
    66 *  This program is free software; you can redistribute it and/or modify
     
    386386        else if (!strncmp(ptr, "LASTONLINETIMESTAMP ", 20))
    387387                sd->info_seen = g_strdup(ptr + 20);
     388        else if (!strncmp(ptr, "BIRTHDAY ", 9))
     389                sd->info_birthday = g_strdup(ptr + 9);
    388390        else if (!strncmp(ptr, "SEX ", 4))
    389391                sd->info_sex = g_strdup(ptr + 4);
     
    399401                sd->info_homepage = g_strdup(ptr + 9);
    400402        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);
    414404
    415405                GString *st = g_string_new("Contact Information\n");
     
    420410                                        sd->info_fullname);
    421411                        g_free(sd->info_fullname);
    422                         sd->info_fullname = NULL;
    423412                }
    424413                if (sd->info_phonehome) {
     
    427416                                        sd->info_phonehome);
    428417                        g_free(sd->info_phonehome);
    429                         sd->info_phonehome = NULL;
    430418                }
    431419                if (sd->info_phoneoffice) {
     
    434422                                        sd->info_phoneoffice);
    435423                        g_free(sd->info_phoneoffice);
    436                         sd->info_phoneoffice = NULL;
    437424                }
    438425                if (sd->info_phonemobile) {
     
    441428                                        sd->info_phonemobile);
    442429                        g_free(sd->info_phonemobile);
    443                         sd->info_phonemobile = NULL;
    444430                }
    445431                g_string_append_printf(st, "Personal Information\n");
     
    449435                                        "Contacts: %s\n", sd->info_nrbuddies);
    450436                        g_free(sd->info_nrbuddies);
    451                         sd->info_nrbuddies = NULL;
    452437                }
    453438                if (sd->info_tz) {
     
    462447                        }
    463448                        g_free(sd->info_tz);
    464                         sd->info_tz = NULL;
    465449                }
    466450                if (sd->info_seen) {
     
    474458                        }
    475459                        g_free(sd->info_seen);
    476                         sd->info_seen = NULL;
    477460                }
    478461                if (sd->info_birthday) {
     
    494477                        }
    495478                        g_free(sd->info_birthday);
    496                         sd->info_birthday = NULL;
    497479                }
    498480                if (sd->info_sex) {
     
    505487                        }
    506488                        g_free(sd->info_sex);
    507                         sd->info_sex = NULL;
    508489                }
    509490                if (sd->info_language) {
     
    518499                        }
    519500                        g_free(sd->info_language);
    520                         sd->info_language = NULL;
    521501                }
    522502                if (sd->info_country) {
     
    531511                        }
    532512                        g_free(sd->info_country);
    533                         sd->info_country = NULL;
    534513                }
    535514                if (sd->info_province) {
     
    538517                                        "Region: %s\n", sd->info_province);
    539518                        g_free(sd->info_province);
    540                         sd->info_province = NULL;
    541519                }
    542520                if (sd->info_city) {
     
    545523                                        "City: %s\n", sd->info_city);
    546524                        g_free(sd->info_city);
    547                         sd->info_city = NULL;
    548525                }
    549526                if (sd->info_homepage) {
     
    552529                                        "Homepage: %s\n", sd->info_homepage);
    553530                        g_free(sd->info_homepage);
    554                         sd->info_homepage = NULL;
    555531                }
    556532                if (sd->info_about) {
     
    559535                                        sd->info_about);
    560536                        g_free(sd->info_about);
    561                         sd->info_about = NULL;
    562537                }
    563538                imcb_log(ic, "%s", st->str);
     
    14711446        skype_printf(ic, "GET USER %s TIMEZONE\n", nick);
    14721447        skype_printf(ic, "GET USER %s LASTONLINETIMESTAMP\n", nick);
     1448        skype_printf(ic, "GET USER %s BIRTHDAY\n", nick);
    14731449        skype_printf(ic, "GET USER %s SEX\n", nick);
    14741450        skype_printf(ic, "GET USER %s LANGUAGE\n", nick);
     
    14781454        skype_printf(ic, "GET USER %s HOMEPAGE\n", nick);
    14791455        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);
    14861456}
    14871457
Note: See TracChangeset for help on using the changeset viewer.