Changeset 05a8932
- Timestamp:
- 2010-05-22T12:21:27Z (15 years ago)
- Branches:
- master
- Children:
- c3caa46
- Parents:
- dca8eff
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/purple/purple.c
rdca8eff r05a8932 359 359 } 360 360 361 static void purple_add_permit( struct im_connection *ic, char *who ) 362 { 363 PurpleAccount *pa = ic->proto_data; 364 365 purple_privacy_permit_add( pa, who, FALSE ); 366 } 367 368 static void purple_add_deny( struct im_connection *ic, char *who ) 369 { 370 PurpleAccount *pa = ic->proto_data; 371 372 purple_privacy_deny_add( pa, who, FALSE ); 373 } 374 375 static void purple_rem_permit( struct im_connection *ic, char *who ) 376 { 377 PurpleAccount *pa = ic->proto_data; 378 379 purple_privacy_permit_remove( pa, who, FALSE ); 380 } 381 382 static void purple_rem_deny( struct im_connection *ic, char *who ) 383 { 384 PurpleAccount *pa = ic->proto_data; 385 386 purple_privacy_deny_remove( pa, who, FALSE ); 387 } 388 361 389 static void purple_get_info( struct im_connection *ic, char *who ) 362 390 { … … 801 829 }; 802 830 831 static void prplcb_privacy_permit_added( PurpleAccount *account, const char *name ) 832 { 833 struct im_connection *ic = purple_ic_by_pa( account ); 834 835 if( !g_slist_find_custom( ic->permit, name, (GCompareFunc) ic->acc->prpl->handle_cmp ) ) 836 ic->permit = g_slist_prepend( ic->permit, g_strdup( name ) ); 837 } 838 839 static void prplcb_privacy_permit_removed( PurpleAccount *account, const char *name ) 840 { 841 struct im_connection *ic = purple_ic_by_pa( account ); 842 void *n; 843 844 n = g_slist_find_custom( ic->permit, name, (GCompareFunc) ic->acc->prpl->handle_cmp ); 845 ic->permit = g_slist_remove( ic->permit, n ); 846 } 847 848 static void prplcb_privacy_deny_added( PurpleAccount *account, const char *name ) 849 { 850 struct im_connection *ic = purple_ic_by_pa( account ); 851 852 if( !g_slist_find_custom( ic->deny, name, (GCompareFunc) ic->acc->prpl->handle_cmp ) ) 853 ic->deny = g_slist_prepend( ic->deny, g_strdup( name ) ); 854 } 855 856 static void prplcb_privacy_deny_removed( PurpleAccount *account, const char *name ) 857 { 858 struct im_connection *ic = purple_ic_by_pa( account ); 859 void *n; 860 861 n = g_slist_find_custom( ic->deny, name, (GCompareFunc) ic->acc->prpl->handle_cmp ); 862 ic->deny = g_slist_remove( ic->deny, n ); 863 } 864 865 static PurplePrivacyUiOps bee_privacy_uiops = 866 { 867 prplcb_privacy_permit_added, 868 prplcb_privacy_permit_removed, 869 prplcb_privacy_deny_added, 870 prplcb_privacy_deny_removed, 871 }; 872 803 873 static void prplcb_debug_print( PurpleDebugLevel level, const char *category, const char *arg_s ) 804 874 { … … 917 987 purple_notify_set_ui_ops( &bee_notify_uiops ); 918 988 purple_xfers_set_ui_ops( &bee_xfer_uiops ); 989 purple_privacy_set_ui_ops( &bee_privacy_uiops ); 919 990 920 991 if( getenv( "BITLBEE_DEBUG" ) ) … … 962 1033 funcs.add_buddy = purple_add_buddy; 963 1034 funcs.remove_buddy = purple_remove_buddy; 1035 funcs.add_permit = purple_add_permit; 1036 funcs.add_deny = purple_add_deny; 1037 funcs.rem_permit = purple_rem_permit; 1038 funcs.rem_deny = purple_rem_deny; 964 1039 funcs.get_info = purple_get_info; 965 1040 funcs.keepalive = purple_keepalive;
Note: See TracChangeset
for help on using the changeset viewer.