Changeset 67454bd
- Timestamp:
- 2007-12-16T02:55:55Z (17 years ago)
- Branches:
- master
- Children:
- 93052e1
- Parents:
- 737e9d9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
skype/skype.c
r737e9d9 r67454bd 81 81 /* If we are waiting for a confirmation about we changed the topic. */ 82 82 int topic_wait; 83 /* These are used by the info command. */ 84 char *info_fullname; 85 char *info_phonehome; 86 char *info_phoneoffice; 87 char *info_phonemobile; 88 char *info_nrbuddies; 89 char *info_tz; 90 char *info_seen; 91 char *info_birthday; 92 char *info_sex; 93 char *info_language; 94 char *info_country; 95 char *info_province; 96 char *info_city; 97 char *info_homepage; 98 char *info_about; 83 99 }; 84 100 … … 267 283 } 268 284 } 285 else if(!strncmp(ptr, "FULLNAME ", 9)) 286 sd->info_fullname = g_strdup_printf("%s", ptr + 9); 287 else if(!strncmp(ptr, "ABOUT ", 6)) 288 { 289 sd->info_about = g_strdup_printf("%s", ptr + 6); 290 291 GString *st = g_string_new("User Info\n"); 292 g_string_append_printf(st, "Skype Name: %s\n", user); 293 if(sd->info_fullname) 294 { 295 g_string_append_printf(st, "Full Name: %s\n", sd->info_fullname); 296 g_free(sd->info_fullname); 297 } 298 imcb_log(ic, "%s", st->str); 299 g_string_free(st, TRUE); 300 } 269 301 } 270 302 else if(!strncmp(line, "CHATMESSAGE ", 12)) … … 750 782 } 751 783 784 static void skype_get_info(struct im_connection *ic, char *who) 785 { 786 char *ptr, *nick, *buf; 787 nick = g_strdup(who); 788 ptr = strchr(nick, '@'); 789 if(ptr) 790 *ptr = '\0'; 791 buf = g_strdup_printf("GET USER %s FULLNAME\n", nick); 792 skype_write(ic, buf, strlen(buf)); 793 g_free(buf); 794 buf = g_strdup_printf("GET USER %s PHONE_HOME\n", nick); 795 skype_write(ic, buf, strlen(buf)); 796 g_free(buf); 797 buf = g_strdup_printf("GET USER %s PHONE_OFFICE\n", nick); 798 skype_write(ic, buf, strlen(buf)); 799 g_free(buf); 800 buf = g_strdup_printf("GET USER %s PHONE_MOBILE\n", nick); 801 skype_write(ic, buf, strlen(buf)); 802 g_free(buf); 803 buf = g_strdup_printf("GET USER %s NROF_AUTHED_BUDDIES\n", nick); 804 skype_write(ic, buf, strlen(buf)); 805 g_free(buf); 806 buf = g_strdup_printf("GET USER %s TIMEZONE\n", nick); 807 skype_write(ic, buf, strlen(buf)); 808 g_free(buf); 809 buf = g_strdup_printf("GET USER %s LASTONLINETIMESTAMP\n", nick); 810 skype_write(ic, buf, strlen(buf)); 811 g_free(buf); 812 buf = g_strdup_printf("GET USER %s BIRTHDAY\n", nick); 813 skype_write(ic, buf, strlen(buf)); 814 g_free(buf); 815 buf = g_strdup_printf("GET USER %s SEX\n", nick); 816 skype_write(ic, buf, strlen(buf)); 817 g_free(buf); 818 buf = g_strdup_printf("GET USER %s LANGUAGE\n", nick); 819 skype_write(ic, buf, strlen(buf)); 820 g_free(buf); 821 buf = g_strdup_printf("GET USER %s COUNTRY\n", nick); 822 skype_write(ic, buf, strlen(buf)); 823 g_free(buf); 824 buf = g_strdup_printf("GET USER %s PROVINCE\n", nick); 825 skype_write(ic, buf, strlen(buf)); 826 g_free(buf); 827 buf = g_strdup_printf("GET USER %s CITY\n", nick); 828 skype_write(ic, buf, strlen(buf)); 829 g_free(buf); 830 buf = g_strdup_printf("GET USER %s HOMEPAGE\n", nick); 831 skype_write(ic, buf, strlen(buf)); 832 g_free(buf); 833 buf = g_strdup_printf("GET USER %s ABOUT\n", nick); 834 skype_write(ic, buf, strlen(buf)); 835 g_free(buf); 836 } 837 752 838 void init_plugin(void) 753 839 { … … 759 845 ret->logout = skype_logout; 760 846 ret->buddy_msg = skype_buddy_msg; 847 ret->get_info = skype_get_info; 761 848 ret->away_states = skype_away_states; 762 849 ret->set_away = skype_set_away;
Note: See TracChangeset
for help on using the changeset viewer.