# HG changeset patch
# Node ID fe688c738fd1
# Parent  24e5305ebcb6
diff --git a/ChangeLog.API b/ChangeLog.API
--- a/ChangeLog.API
+++ b/ChangeLog.API
@@ -675,8 +675,10 @@
 		* purple_running_osx
 		* purple_serv_add_deny
 		* purple_serv_add_permit
+		* purple_serv_get_info
 		* purple_serv_remove_deny
 		* purple_serv_remove_permit
+		* purple_serv_set_info
 		* purple_serv_set_permit_deny
 		* PurpleSetPublicAliasFailureCallback
 		* PurpleSetPublicAliasSuccessCallback
diff --git a/finch/gntblist.c b/finch/gntblist.c
--- a/finch/gntblist.c
+++ b/finch/gntblist.c
@@ -1105,13 +1105,24 @@
 
 gpointer finch_retrieve_user_info(PurpleConnection *conn, const char *name)
 {
-	PurpleNotifyUserInfo *info = purple_notify_user_info_new();
+	PurpleProtocol *protocol = NULL;
+	PurpleNotifyUserInfo *info = NULL;
 	gpointer uihandle;
+
+	protocol = purple_connection_get_protocol(conn);
+
+	if(!PURPLE_IS_PROTOCOL_SERVER(protocol)) {
+		return;
+	}
+
+	purple_protocol_server_get_info(PURPLE_PROTOCOL_SERVER(protocol), conn,
+	                                name);
+
+	info = purple_notify_user_info_new();
 	purple_notify_user_info_add_pair_plaintext(info, _("Information"), _("Retrieving..."));
 	uihandle = purple_notify_userinfo(conn, name, info, NULL, NULL);
 	purple_notify_user_info_destroy(info);
 
-	purple_serv_get_info(conn, name);
 	return uihandle;
 }
 
diff --git a/libpurple/account.c b/libpurple/account.c
--- a/libpurple/account.c
+++ b/libpurple/account.c
@@ -335,11 +335,16 @@
 static void
 set_user_info_cb(PurpleAccount *account, const char *user_info)
 {
-	PurpleConnection *gc;
+	PurpleProtocol *protocol = NULL;
 
 	purple_account_set_user_info(account, user_info);
-	gc = purple_account_get_connection(account);
-	purple_serv_set_info(gc, user_info);
+
+	protocol = purple_account_get_protocol(account);
+	if(PURPLE_PROTOCOL_IMPLEMENTS(protocol, SERVER, set_info)) {
+		PurpleConnection *connection = purple_account_get_connection(account);
+		purple_protocol_server_set_info(PURPLE_PROTOCOL_SERVER(protocol),
+		                                connection, user_info);
+	}
 }
 
 static void
diff --git a/libpurple/protocols/jabber/buddy.c b/libpurple/protocols/jabber/buddy.c
--- a/libpurple/protocols/jabber/buddy.c
+++ b/libpurple/protocols/jabber/buddy.c
@@ -559,6 +559,7 @@
 {
 	PurpleXmlNode *vc_node;
 	PurpleRequestField *field;
+	PurpleProtocol *protocol = NULL;
 	const char *text;
 	char *p;
 	const struct vcard_template *vc_tp;
@@ -594,7 +595,11 @@
 	purple_xmlnode_free(vc_node);
 
 	purple_account_set_user_info(purple_connection_get_account(gc), p);
-	purple_serv_set_info(gc, p);
+	protocol = purple_connection_get_protocol(gc);
+	if(PURPLE_PROTOCOL_IMPLEMENTS(protocol, SERVER, set_info)) {
+		purple_protocol_server_set_info(PURPLE_PROTOCOL_SERVER(protocol),
+		                                gc, p);
+	}
 
 	g_free(p);
 }
diff --git a/libpurple/server.h b/libpurple/server.h
--- a/libpurple/server.h
+++ b/libpurple/server.h
@@ -76,24 +76,6 @@
  */
 int  purple_serv_send_im(PurpleConnection *gc, PurpleMessage *msg);
 
-/**
- * purple_serv_get_info:
- * @gc:     The connection over which to send the typing notification.
- * @name:   The name of the buddy we were asking information from.
- *
- * Request user information from the server.
- */
-void purple_serv_get_info(PurpleConnection *gc, const char *name);
-
-/**
- * purple_serv_set_info:
- * @gc:     The connection over which to send the typing notification.
- * @info:   Information text to be sent to the server.
- *
- * Set user account information on the server.
- */
-void purple_serv_set_info(PurpleConnection *gc, const char *info);
-
 /******************************************************************************
  * Chat Interface
  *****************************************************************************/
diff --git a/libpurple/server.c b/libpurple/server.c
--- a/libpurple/server.c
+++ b/libpurple/server.c
@@ -96,31 +96,6 @@
 	return val;
 }
 
-void purple_serv_get_info(PurpleConnection *gc, const char *name)
-{
-	PurpleProtocol *protocol;
-
-	if (gc) {
-		protocol = purple_connection_get_protocol(gc);
-		purple_protocol_server_get_info(PURPLE_PROTOCOL_SERVER(protocol), gc,
-		                                name);
-	}
-}
-
-void purple_serv_set_info(PurpleConnection *gc, const char *info)
-{
-	PurpleProtocol *protocol;
-
-	if (gc) {
-		protocol = purple_connection_get_protocol(gc);
-
-		if (PURPLE_PROTOCOL_IMPLEMENTS(protocol, SERVER, set_info)) {
-			purple_protocol_server_set_info(PURPLE_PROTOCOL_SERVER(protocol),
-			                                gc, info);
-		}
-	}
-}
-
 /*
  * Set buddy's alias on server roster/list
  */
diff --git a/pidgin/gtkutils.c b/pidgin/gtkutils.c
--- a/pidgin/gtkutils.c
+++ b/pidgin/gtkutils.c
@@ -139,21 +139,26 @@
 	}
 }
 
-static void
-show_retrieveing_info(PurpleConnection *conn, const char *name)
-{
-	PurpleNotifyUserInfo *info = purple_notify_user_info_new();
-	purple_notify_user_info_add_pair_plaintext(info, _("Information"), _("Retrieving..."));
+void
+pidgin_retrieve_user_info(PurpleConnection *conn, const char *name) {
+	PurpleNotifyUserInfo *info = NULL;
+	PurpleProtocol *protocol = NULL;
+
+	protocol = purple_connection_get_protocol(conn);
+	if(!PURPLE_IS_PROTOCOL_SERVER(protocol)) {
+		return;
+	}
+
+	purple_protocol_server_get_info(PURPLE_PROTOCOL_SERVER(protocol), conn,
+	                                name);
+
+	info = purple_notify_user_info_new();
+	purple_notify_user_info_add_pair_plaintext(info, _("Information"),
+	                                           _("Retrieving..."));
 	purple_notify_userinfo(conn, name, info, NULL, NULL);
 	purple_notify_user_info_destroy(info);
 }
 
-void pidgin_retrieve_user_info(PurpleConnection *conn, const char *name)
-{
-	show_retrieveing_info(conn, name);
-	purple_serv_get_info(conn, name);
-}
-
 void pidgin_retrieve_user_info_in_chat(PurpleConnection *conn, const char *name, int chat)
 {
 	char *who = NULL;
