Index: protocols/nogaim.c
===================================================================
--- protocols/nogaim.c	(revision 177ffd7da1570485698f6c105374e86c4471c94a)
+++ protocols/nogaim.c	(revision d0527c1845ed1230bbc3b0f94b8643cd8f9fddc3)
@@ -381,4 +381,10 @@
 {
 	query_add( (irc_t *) ic->bee->ui_data, ic, msg, doit, dont, g_free, data );
+}
+
+void imcb_ask_with_free( struct im_connection *ic, char *msg, void *data,
+                         query_callback doit, query_callback dont, query_callback myfree )
+{
+	query_add( (irc_t *) ic->bee->ui_data, ic, msg, doit, dont, myfree, data );
 }
 
Index: protocols/nogaim.h
===================================================================
--- protocols/nogaim.h	(revision 177ffd7da1570485698f6c105374e86c4471c94a)
+++ protocols/nogaim.h	(revision d0527c1845ed1230bbc3b0f94b8643cd8f9fddc3)
@@ -269,4 +269,5 @@
  */
 G_MODULE_EXPORT void imcb_ask( struct im_connection *ic, char *msg, void *data, query_callback doit, query_callback dont );
+G_MODULE_EXPORT void imcb_ask_with_free( struct im_connection *ic, char *msg, void *data, query_callback doit, query_callback dont, query_callback myfree );
 
 /* Two common questions you may want to ask:
Index: protocols/purple/purple.c
===================================================================
--- protocols/purple/purple.c	(revision 177ffd7da1570485698f6c105374e86c4471c94a)
+++ protocols/purple/purple.c	(revision d0527c1845ed1230bbc3b0f94b8643cd8f9fddc3)
@@ -884,18 +884,20 @@
 }
 
+/*
 static void prplcb_request_test()
 {
 	fprintf( stderr, "bla\n" );
 }
+*/
 
 static PurpleRequestUiOps bee_request_uiops =
 {
-	prplcb_request_test,
-	prplcb_request_test,
+	NULL,
+	NULL,
 	prplcb_request_action,
-	prplcb_request_test,
-	prplcb_request_test,
-	prplcb_request_test,
-	prplcb_request_test,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
 };
 
@@ -1048,15 +1050,43 @@
 };
 
+static void *prplcb_account_request_authorize( PurpleAccount *account, const char *remote_user,
+	const char *id, const char *alias, const char *message, gboolean on_list,
+	PurpleAccountRequestAuthorizationCb authorize_cb, PurpleAccountRequestAuthorizationCb deny_cb, void *user_data )
+{
+	struct im_connection *ic = purple_ic_by_pa( account );
+	char *q;
+	
+	if( alias )
+		q = g_strdup_printf( "%s (%s) wants to add you to his/her contact "
+		                     "list. (%s)", alias, remote_user, message );
+	else
+		q = g_strdup_printf( "%s wants to add you to his/her contact "
+		                     "list. (%s)", remote_user, message );
+	
+	imcb_ask_with_free( ic, q, user_data, authorize_cb, deny_cb, NULL );
+	g_free( q );
+}
+
+static PurpleAccountUiOps bee_account_uiops =
+{
+	NULL,
+	NULL,
+	NULL,
+	prplcb_account_request_authorize,
+	NULL,
+};
+
 extern PurpleXferUiOps bee_xfer_uiops;
 
 static void purple_ui_init()
 {
+	purple_connections_set_ui_ops( &bee_conn_uiops );
 	purple_blist_set_ui_ops( &bee_blist_uiops );
-	purple_connections_set_ui_ops( &bee_conn_uiops );
 	purple_conversations_set_ui_ops( &bee_conv_uiops );
 	purple_request_set_ui_ops( &bee_request_uiops );
+	purple_privacy_set_ui_ops( &bee_privacy_uiops );
 	purple_notify_set_ui_ops( &bee_notify_uiops );
+	purple_accounts_set_ui_ops( &bee_account_uiops );
 	purple_xfers_set_ui_ops( &bee_xfer_uiops );
-	purple_privacy_set_ui_ops( &bee_privacy_uiops );
 	
 	if( getenv( "BITLBEE_DEBUG" ) )
@@ -1077,8 +1107,8 @@
 	}
 	
-	purple_util_set_user_dir("/tmp");
-	purple_debug_set_enabled(FALSE);
-	purple_core_set_ui_ops(&bee_core_uiops);
-	purple_eventloop_set_ui_ops(&glib_eventloops);
+	purple_util_set_user_dir( "/tmp" );
+	purple_debug_set_enabled( FALSE );
+	purple_core_set_ui_ops( &bee_core_uiops );
+	purple_eventloop_set_ui_ops( &glib_eventloops );
 	if( !purple_core_init( "BitlBee") )
 	{
@@ -1089,5 +1119,5 @@
 	
 	/* This seems like stateful shit we don't want... */
-	purple_set_blist(purple_blist_new());
+	purple_set_blist( purple_blist_new() );
 	purple_blist_load();
 	
@@ -1120,5 +1150,5 @@
 	funcs.transfer_request = purple_transfer_request;
 	
-	help = g_string_new("BitlBee libpurple module supports the following IM protocols:\n");
+	help = g_string_new( "BitlBee libpurple module supports the following IM protocols:\n" );
 	
 	/* Add a protocol entry to BitlBee's structures for every protocol
