- Timestamp:
- 2010-05-22T00:58:59Z (15 years ago)
- Branches:
- master
- Children:
- dca8eff
- Parents:
- 2c5fabc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/purple/purple.c
r2c5fabc re77c264 359 359 } 360 360 361 static void purple_get_info( struct im_connection *ic, char *who ) 362 { 363 serv_get_info( purple_account_get_connection( ic->proto_data ), who ); 364 } 365 361 366 static void purple_keepalive( struct im_connection *ic ) 362 367 { … … 825 830 } 826 831 832 static void *prplcb_notify_userinfo( PurpleConnection *gc, const char *who, PurpleNotifyUserInfo *user_info ) 833 { 834 struct im_connection *ic = purple_ic_by_gc( gc ); 835 GString *info = g_string_new( "" ); 836 GList *l = purple_notify_user_info_get_entries( user_info ); 837 char *key; 838 const char *value; 839 int n; 840 841 while( l ) 842 { 843 PurpleNotifyUserInfoEntry *e = l->data; 844 845 switch( purple_notify_user_info_entry_get_type( e ) ) 846 { 847 case PURPLE_NOTIFY_USER_INFO_ENTRY_PAIR: 848 case PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_HEADER: 849 key = g_strdup( purple_notify_user_info_entry_get_label( e ) ); 850 value = purple_notify_user_info_entry_get_value( e ); 851 852 if( key ) 853 { 854 strip_html( key ); 855 g_string_append_printf( info, "%s: ", key ); 856 857 if( value ) 858 { 859 n = strlen( value ) - 1; 860 while( isspace( value[n] ) ) 861 n --; 862 g_string_append_len( info, value, n + 1 ); 863 } 864 g_string_append_c( info, '\n' ); 865 g_free( key ); 866 } 867 868 break; 869 case PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_BREAK: 870 g_string_append( info, "------------------------\n" ); 871 break; 872 } 873 874 l = l->next; 875 } 876 877 imcb_log( ic, "User %s info:\n%s", who, info->str ); 878 g_string_free( info, TRUE ); 879 880 return NULL; 881 } 882 827 883 static PurpleNotifyUiOps bee_notify_uiops = 828 884 { 829 885 NULL, 830 886 prplcb_notify_email, 887 NULL, 888 NULL, 889 NULL, 890 NULL, 891 prplcb_notify_userinfo, 831 892 }; 832 893 … … 886 947 funcs.add_buddy = purple_add_buddy; 887 948 funcs.remove_buddy = purple_remove_buddy; 949 funcs.get_info = purple_get_info; 888 950 funcs.keepalive = purple_keepalive; 889 951 funcs.send_typing = purple_send_typing;
Note: See TracChangeset
for help on using the changeset viewer.