changeset 31087:f9664876549f

Implement a migration for ICQ login servers.
author John Bailey <rekkanoryo@rekkanoryo.org>
date Sun, 31 Oct 2010 23:08:10 +0000
parents 1558900f47e5
children 948a94dcff94
files libpurple/account.c
diffstat 1 files changed, 25 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/account.c	Sat Oct 30 21:53:38 2010 +0000
+++ b/libpurple/account.c	Sun Oct 31 23:08:10 2010 +0000
@@ -513,6 +513,28 @@
 }
 
 static void
+migrate_icq_server(PurpleAccount *account)
+{
+	/* Migrate the login server setting for ICQ accounts.  See
+	 * 'mtn log --last 1 --no-graph --from b6d7712e90b68610df3bd2d8cbaf46d94c8b3794'
+	 * for details on the change. */
+
+	if(purple_strequal(purple_account_get_protocol_id(account), "prpl-icq")) {
+		/* Non-secure server */
+		if(purple_strequal(purple_account_get_string(account, "server", NULL),
+				"login.messaging.aol.com"))
+			purple_account_set_string(account, "server", "login.icq.com");
+
+		/* Secure server */
+		if(purple_strequal(purple_account_get_string(account, "server", NULL),
+				"slogin.messaging.aol.com"))
+			purple_account_set_string(account, "server", "slogin.icq.com");
+	}
+
+	return;
+}
+
+static void
 migrate_xmpp_encryption(PurpleAccount *account)
 {
 	/* When this is removed, nuke the "old_ssl" and "require_tls" settings */
@@ -598,6 +620,9 @@
 	/* we do this here because we need access to account settings to determine
 	 * if we can/should migrate an old Yahoo! JAPAN account */
 	migrate_yahoo_japan(account);
+	/* we do this here because we need access to account settings to determine
+	 * if we can/should migrate an ICQ account's server setting */
+	migrate_icq_server(account);
 	/* we do this here because we need to do it before the user views the
 	 * Edit Account dialog. */
 	migrate_xmpp_encryption(account);