Index: protocols/jabber/jabber_util.c
===================================================================
--- protocols/jabber/jabber_util.c	(revision f3351f0ae5c6014e36e529684b81e78cad9a66ce)
+++ protocols/jabber/jabber_util.c	(revision 9143aeb969697e05953b0f60a2fff2581fa0f18c)
@@ -246,6 +246,8 @@
 };
 
-static void jabber_buddy_ask_yes( gpointer w, struct jabber_buddy_ask_data *bla )
-{
+static void jabber_buddy_ask_yes( void *data )
+{
+	struct jabber_buddy_ask_data *bla = data;
+	
 	presence_send_request( bla->ic, bla->handle, "subscribed" );
 	
@@ -257,6 +259,8 @@
 }
 
-static void jabber_buddy_ask_no( gpointer w, struct jabber_buddy_ask_data *bla )
-{
+static void jabber_buddy_ask_no( void *data )
+{
+	struct jabber_buddy_ask_data *bla = data;
+	
 	presence_send_request( bla->ic, bla->handle, "subscribed" );
 	
Index: protocols/msn/msn_util.c
===================================================================
--- protocols/msn/msn_util.c	(revision f3351f0ae5c6014e36e529684b81e78cad9a66ce)
+++ protocols/msn/msn_util.c	(revision 9143aeb969697e05953b0f60a2fff2581fa0f18c)
@@ -90,6 +90,8 @@
 };
 
-static void msn_buddy_ask_yes( gpointer w, struct msn_buddy_ask_data *bla )
-{
+static void msn_buddy_ask_yes( void *data )
+{
+	struct msn_buddy_ask_data *bla = data;
+	
 	msn_buddy_list_add( bla->ic, "AL", bla->handle, bla->realname );
 	
@@ -102,6 +104,8 @@
 }
 
-static void msn_buddy_ask_no( gpointer w, struct msn_buddy_ask_data *bla )
-{
+static void msn_buddy_ask_no( void *data )
+{
+	struct msn_buddy_ask_data *bla = data;
+	
 	msn_buddy_list_add( bla->ic, "BL", bla->handle, bla->realname );
 	
Index: protocols/nogaim.c
===================================================================
--- protocols/nogaim.c	(revision f3351f0ae5c6014e36e529684b81e78cad9a66ce)
+++ protocols/nogaim.c	(revision 9143aeb969697e05953b0f60a2fff2581fa0f18c)
@@ -343,5 +343,6 @@
 /* dialogs.c */
 
-void imcb_ask( struct im_connection *ic, char *msg, void *data, void *doit, void *dont )
+void imcb_ask( struct im_connection *ic, char *msg, void *data,
+               query_callback doit, query_callback dont )
 {
 	query_add( ic->irc, ic, msg, doit, dont, data );
@@ -495,16 +496,18 @@
 };
 
-void show_got_added_no( gpointer w, struct show_got_added_data *data )
-{
-	g_free( data->handle );
+void show_got_added_no( void *data )
+{
+	g_free( ((struct show_got_added_data*)data)->handle );
 	g_free( data );
 }
 
-void show_got_added_yes( gpointer w, struct show_got_added_data *data )
-{
-	data->ic->acc->prpl->add_buddy( data->ic, data->handle, NULL );
-	/* imcb_add_buddy( data->ic, NULL, data->handle, data->handle ); */
-	
-	return show_got_added_no( w, data );
+void show_got_added_yes( void *data )
+{
+	struct show_got_added_data *sga = data;
+	
+	sga->ic->acc->prpl->add_buddy( sga->ic, sga->handle, NULL );
+	/* imcb_add_buddy( sga->ic, NULL, sga->handle, sga->handle ); */
+	
+	return show_got_added_no( data );
 }
 
Index: protocols/nogaim.h
===================================================================
--- protocols/nogaim.h	(revision f3351f0ae5c6014e36e529684b81e78cad9a66ce)
+++ protocols/nogaim.h	(revision 9143aeb969697e05953b0f60a2fff2581fa0f18c)
@@ -42,4 +42,5 @@
 #include "account.h"
 #include "proxy.h"
+#include "query.h"
 #include "md5.h"
 
@@ -261,5 +262,5 @@
  * - 'doit' or 'dont' will be called depending of the answer of the user.
  */
-G_MODULE_EXPORT void imcb_ask( struct im_connection *ic, char *msg, void *data, void *doit, void *dont );
+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_add( struct im_connection *ic, char *handle, const char *realname );
 
Index: protocols/oscar/oscar.c
===================================================================
--- protocols/oscar/oscar.c	(revision f3351f0ae5c6014e36e529684b81e78cad9a66ce)
+++ protocols/oscar/oscar.c	(revision 9143aeb969697e05953b0f60a2fff2581fa0f18c)
@@ -1084,6 +1084,6 @@
 }
 
-void oscar_accept_chat(gpointer w, struct aim_chat_invitation * inv);
-void oscar_reject_chat(gpointer w, struct aim_chat_invitation * inv);
+void oscar_accept_chat(void *data);
+void oscar_reject_chat(void *data);
 	
 static int incomingim_chan2(aim_session_t *sess, aim_conn_t *conn, aim_userinfo_t *userinfo, struct aim_incomingim_ch2_args *args) {
@@ -1119,5 +1119,6 @@
 }
 
-static void gaim_icq_authgrant(gpointer w, struct icq_auth *data) {
+static void gaim_icq_authgrant(void *data_) {
+	struct icq_auth *data = data_;
 	char *uin, message;
 	struct oscar_data *od = (struct oscar_data *)data->ic->proto_data;
@@ -1134,5 +1135,6 @@
 }
 
-static void gaim_icq_authdeny(gpointer w, struct icq_auth *data) {
+static void gaim_icq_authdeny(void *data_) {
+	struct icq_auth *data = data_;
 	char *uin, *message;
 	struct oscar_data *od = (struct oscar_data *)data->ic->proto_data;
@@ -2588,6 +2590,8 @@
 }
 
-void oscar_accept_chat(gpointer w, struct aim_chat_invitation * inv)
+void oscar_accept_chat(void *data)
 {
+	struct aim_chat_invitation * inv = data;
+	
 	oscar_chat_join(inv->ic, inv->name, NULL, NULL);
 	g_free(inv->name);
@@ -2595,6 +2599,8 @@
 }
 
-void oscar_reject_chat(gpointer w, struct aim_chat_invitation * inv)
+void oscar_reject_chat(void *data)
 {
+	struct aim_chat_invitation * inv = data;
+	
 	g_free(inv->name);
 	g_free(inv);
Index: protocols/yahoo/yahoo.c
===================================================================
--- protocols/yahoo/yahoo.c	(revision f3351f0ae5c6014e36e529684b81e78cad9a66ce)
+++ protocols/yahoo/yahoo.c	(revision 9143aeb969697e05953b0f60a2fff2581fa0f18c)
@@ -797,6 +797,8 @@
 }
 
-static void byahoo_accept_conf( gpointer w, struct byahoo_conf_invitation *inv )
-{
+static void byahoo_accept_conf( void *data )
+{
+	struct byahoo_conf_invitation *inv = data;
+	
 	yahoo_conference_logon( inv->yid, NULL, inv->members, inv->name );
 	imcb_chat_add_buddy( inv->c, inv->ic->acc->user );
@@ -805,6 +807,8 @@
 }
 
-static void byahoo_reject_conf( gpointer w, struct byahoo_conf_invitation *inv )
-{
+static void byahoo_reject_conf( void *data )
+{
+	struct byahoo_conf_invitation *inv = data;
+	
 	yahoo_conference_decline( inv->yid, NULL, inv->members, inv->name, "User rejected groupchat" );
 	imcb_chat_free( inv->c );
Index: query.c
===================================================================
--- query.c	(revision f3351f0ae5c6014e36e529684b81e78cad9a66ce)
+++ query.c	(revision 9143aeb969697e05953b0f60a2fff2581fa0f18c)
@@ -30,5 +30,6 @@
 static query_t *query_default( irc_t *irc );
 
-query_t *query_add( irc_t *irc, struct im_connection *ic, char *question, void *yes, void *no, void *data )
+query_t *query_add( irc_t *irc, struct im_connection *ic, char *question,
+                    query_callback yes, query_callback no, void *data )
 {
 	query_t *q = g_new0( query_t, 1 );
@@ -144,5 +145,5 @@
 		else
 			irc_usermsg( irc, "Accepted: %s", q->question );
-		q->yes( NULL, q->data );
+		q->yes( q->data );
 	}
 	else
@@ -152,5 +153,5 @@
 		else
 			irc_usermsg( irc, "Rejected: %s", q->question );
-		q->no( NULL, q->data );
+		q->no( q->data );
 	}
 	q->data = NULL;
Index: query.h
===================================================================
--- query.h	(revision f3351f0ae5c6014e36e529684b81e78cad9a66ce)
+++ query.h	(revision 9143aeb969697e05953b0f60a2fff2581fa0f18c)
@@ -27,15 +27,17 @@
 #define _QUERY_H
 
+typedef void (*query_callback) ( void *data );
+
 typedef struct query
 {
 	struct im_connection *ic;
 	char *question;
-	void (* yes) ( gpointer w, void *data );
-	void (* no) ( gpointer w, void *data );
+	query_callback yes, no;
 	void *data;
 	struct query *next;
 } query_t;
 
-query_t *query_add( irc_t *irc, struct im_connection *ic, char *question, void *yes, void *no, void *data );
+query_t *query_add( irc_t *irc, struct im_connection *ic, char *question,
+                    query_callback yes, query_callback no, void *data );
 void query_del( irc_t *irc, query_t *q );
 void query_del_by_conn( irc_t *irc, struct im_connection *ic );
