# HG changeset patch
# Node ID 1e3cb1d4fff70a66354a7130c00fae641c98f0bd
# Parent  5c55680a1a6b5689f7dee66d0aebbb470ac7ffc6
diff --git a/protocols/bonjour/purplebonjourconnection.c b/protocols/bonjour/purplebonjourconnection.c
--- a/protocols/bonjour/purplebonjourconnection.c
+++ b/protocols/bonjour/purplebonjourconnection.c
@@ -54,7 +54,7 @@
 	account = purple_connection_get_account(purple_connection);
 
 	/* Grab some more information that we need. */
-	username = purple_contact_info_get_username(PURPLE_CONTACT_INFO(account));
+	username = purple_account_get_username(account);
 	port = purple_account_get_int(account, PURPLE_BONJOUR_OPTION_PORT,
 	                              PURPLE_BONJOUR_DEFAULT_PORT);
 
diff --git a/protocols/demo/purpledemoprotocolactions.c b/protocols/demo/purpledemoprotocolactions.c
--- a/protocols/demo/purpledemoprotocolactions.c
+++ b/protocols/demo/purpledemoprotocolactions.c
@@ -251,7 +251,10 @@
 
 	account = purple_request_page_get_account(page, "account");
 	if(PURPLE_IS_ACCOUNT(account)) {
-		tmp = purple_contact_info_get_name_for_display(PURPLE_CONTACT_INFO(account));
+		PurpleContactInfo *info = NULL;
+
+		info = purple_account_get_contact_info(account);
+		tmp = purple_contact_info_get_name_for_display(info);
 	} else {
 		tmp = _("(unset)");
 	}
diff --git a/protocols/demo/purpledemoprotocolconversation.c b/protocols/demo/purpledemoprotocolconversation.c
--- a/protocols/demo/purpledemoprotocolconversation.c
+++ b/protocols/demo/purpledemoprotocolconversation.c
@@ -72,7 +72,7 @@
 	/* Build a checksum of the account and the sorted participants. */
 	checksum = g_checksum_new(G_CHECKSUM_SHA256);
 
-	id = purple_contact_info_get_id(PURPLE_CONTACT_INFO(account));
+	id = purple_account_get_id(account);
 	g_checksum_update(checksum, (guchar *)id, -1);
 
 	for(guint i = 0; i < g_list_model_get_n_items(G_LIST_MODEL(sorted)); i++) {
diff --git a/protocols/ircv3/purpleircv3connection.c b/protocols/ircv3/purpleircv3connection.c
--- a/protocols/ircv3/purpleircv3connection.c
+++ b/protocols/ircv3/purpleircv3connection.c
@@ -560,7 +560,6 @@
 	PurpleIRCv3Connection *connection = PURPLE_IRCV3_CONNECTION(obj);
 	PurpleIRCv3ConnectionPrivate *priv = NULL;
 	PurpleAccount *account = NULL;
-	PurpleContactInfo *info = NULL;
 	PurpleConversationManager *conversation_manager = NULL;
 	char **userparts = NULL;
 	const char *username = NULL;
@@ -570,13 +569,12 @@
 
 	priv = purple_ircv3_connection_get_instance_private(connection);
 	account = purple_connection_get_account(PURPLE_CONNECTION(connection));
-	info = PURPLE_CONTACT_INFO(account);
 
 	title = g_strdup_printf(_("status for %s"),
-	                        purple_contact_info_get_username(info));
+	                        purple_account_get_username(account));
 
 	/* Split the username into nick and server and store the values. */
-	username = purple_contact_info_get_username(PURPLE_CONTACT_INFO(account));
+	username = purple_account_get_username(account);
 	userparts = g_strsplit(username, "@", 2);
 	purple_connection_set_display_name(PURPLE_CONNECTION(connection),
 	                                   userparts[0]);
diff --git a/protocols/ircv3/purpleircv3protocol.c b/protocols/ircv3/purpleircv3protocol.c
--- a/protocols/ircv3/purpleircv3protocol.c
+++ b/protocols/ircv3/purpleircv3protocol.c
@@ -141,7 +141,7 @@
 	/* Make sure the username (which includes the servername via usersplits),
 	 * does not contain any whitespace.
 	 */
-	username = purple_contact_info_get_username(PURPLE_CONTACT_INFO(account));
+	username = purple_account_get_username(account);
 	if(strpbrk(username, " \t\v\r\n") != NULL) {
 		g_set_error(error,
 		            PURPLE_CONNECTION_ERROR,
@@ -177,7 +177,7 @@
 
 	monitor = g_network_monitor_get_default();
 
-	username = purple_contact_info_get_username(PURPLE_CONTACT_INFO(account));
+	username = purple_account_get_username(account);
 	parts = g_strsplit(username, "@", 2);
 	port = purple_account_get_int(account, "port",
 	                              PURPLE_IRCV3_DEFAULT_TLS_PORT);
diff --git a/protocols/xmpp/purplexmppconnection.c b/protocols/xmpp/purplexmppconnection.c
--- a/protocols/xmpp/purplexmppconnection.c
+++ b/protocols/xmpp/purplexmppconnection.c
@@ -104,7 +104,7 @@
 	}
 
 	/* Grab some more information that we need. */
-	username = purple_contact_info_get_username(PURPLE_CONTACT_INFO(account));
+	username = purple_account_get_username(account);
 	connection->xeme_connection = xeme_connection_new(username);
 
 	/* If we have a resource, tell the xeme connection about it. */
