Mercurial > pidgin.yaz
comparison libpurple/protocols/gg/gg.c @ 32741:318345f39e98
Gadu-Gadu: function to normalize gg usernames
author | tomkiewicz@cpw.pidgin.im |
---|---|
date | Thu, 13 Oct 2011 15:27:52 +0000 |
parents | 9740dd029827 |
children | 26ffd7fdba7d |
comparison
equal
deleted
inserted
replaced
32740:9740dd029827 | 32741:318345f39e98 |
---|---|
2080 static const char *ggp_list_icon(PurpleAccount *account, PurpleBuddy *buddy) | 2080 static const char *ggp_list_icon(PurpleAccount *account, PurpleBuddy *buddy) |
2081 { | 2081 { |
2082 return "gadu-gadu"; | 2082 return "gadu-gadu"; |
2083 } | 2083 } |
2084 | 2084 |
2085 static const char *ggp_normalize(const PurpleAccount *account, const char *who) | |
2086 { | |
2087 static char normalized[21]; /* maximum unsigned long long int size */ | |
2088 | |
2089 uin_t uin = ggp_str_to_uin(who); | |
2090 if (uin <= 0) | |
2091 return NULL; | |
2092 | |
2093 g_snprintf(normalized, sizeof(normalized), "%u", uin); | |
2094 | |
2095 return normalized; | |
2096 } | |
2097 | |
2085 static char *ggp_status_text(PurpleBuddy *b) | 2098 static char *ggp_status_text(PurpleBuddy *b) |
2086 { | 2099 { |
2087 PurpleStatus *status; | 2100 PurpleStatus *status; |
2088 const char *msg; | 2101 const char *msg; |
2089 char *text; | 2102 char *text; |
2848 NULL, /* alias_buddy */ | 2861 NULL, /* alias_buddy */ |
2849 NULL, /* group_buddy */ | 2862 NULL, /* group_buddy */ |
2850 NULL, /* rename_group */ | 2863 NULL, /* rename_group */ |
2851 NULL, /* buddy_free */ | 2864 NULL, /* buddy_free */ |
2852 NULL, /* convo_closed */ | 2865 NULL, /* convo_closed */ |
2853 NULL, /* normalize */ | 2866 ggp_normalize, /* normalize */ |
2854 NULL, /* set_buddy_icon */ | 2867 NULL, /* set_buddy_icon */ |
2855 NULL, /* remove_group */ | 2868 NULL, /* remove_group */ |
2856 NULL, /* get_cb_real_name */ | 2869 NULL, /* get_cb_real_name */ |
2857 NULL, /* set_chat_topic */ | 2870 NULL, /* set_chat_topic */ |
2858 NULL, /* find_blist_chat */ | 2871 NULL, /* find_blist_chat */ |