aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/nogaim.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2006-05-23 10:09:16 +0200
committerWilmer van der Gaast <wilmer@gaast.net>2006-05-23 10:09:16 +0200
commitda3b53657c8e554fc8c28c8ef61ef44492da24dd (patch)
tree35c434510dec74965229340f9b804511a5a608b5 /protocols/nogaim.c
parent226fce105c1189bde1aa321b494494d49b463e90 (diff)
Added bim_ functions for block/allow list management to keep gc->permit/deny
up-to-date at run-time.
Diffstat (limited to 'protocols/nogaim.c')
-rw-r--r--protocols/nogaim.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/protocols/nogaim.c b/protocols/nogaim.c
index a9b27e92..04d48236 100644
--- a/protocols/nogaim.c
+++ b/protocols/nogaim.c
@@ -1070,3 +1070,49 @@ static char *bim_away_alias_find( GList *gcm, char *away )
return( NULL );
}
+
+void bim_add_allow( struct gaim_connection *gc, char *handle )
+{
+ if( g_slist_find_custom( gc->permit, handle, (GCompareFunc) gc->prpl->cmp_buddynames ) == NULL )
+ {
+ gc->permit = g_slist_prepend( gc->permit, g_strdup( handle ) );
+ }
+
+ gc->prpl->add_permit( gc, handle );
+}
+
+void bim_rem_allow( struct gaim_connection *gc, char *handle )
+{
+ GSList *l;
+
+ if( ( l = g_slist_find_custom( gc->permit, handle, (GCompareFunc) gc->prpl->cmp_buddynames ) ) )
+ {
+ g_free( l->data );
+ gc->permit = g_slist_delete_link( gc->permit, l );
+ }
+
+ gc->prpl->rem_permit( gc, handle );
+}
+
+void bim_add_block( struct gaim_connection *gc, char *handle )
+{
+ if( g_slist_find_custom( gc->deny, handle, (GCompareFunc) gc->prpl->cmp_buddynames ) == NULL )
+ {
+ gc->deny = g_slist_prepend( gc->deny, g_strdup( handle ) );
+ }
+
+ gc->prpl->add_deny( gc, handle );
+}
+
+void bim_rem_block( struct gaim_connection *gc, char *handle )
+{
+ GSList *l;
+
+ if( ( l = g_slist_find_custom( gc->deny, handle, (GCompareFunc) gc->prpl->cmp_buddynames ) ) )
+ {
+ g_free( l->data );
+ gc->deny = g_slist_delete_link( gc->deny, l );
+ }
+
+ gc->prpl->rem_deny( gc, handle );
+}