pidgin: c2a655c7: Implement a migration for ICQ login serv...

rekkanoryo at pidgin.im rekkanoryo at pidgin.im
Sun Oct 31 19:10:42 EDT 2010


----------------------------------------------------------------------
Revision: c2a655c73bb450a2f57b541eae90f3375f4ad811
Parent:   59e16ff94a4636665de90332c92822e35d063b2b
Author:   rekkanoryo at pidgin.im
Date:     10/31/10 19:08:10
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/c2a655c73bb450a2f57b541eae90f3375f4ad811

Changelog: 

Implement a migration for ICQ login servers.

Changes against parent 59e16ff94a4636665de90332c92822e35d063b2b

  patched  libpurple/account.c

-------------- next part --------------
============================================================
--- libpurple/account.c	6604d1b1b68205a426ab77db867e2051722364fe
+++ libpurple/account.c	45145a159c92b2115e1d74917071e964b422d66a
@@ -513,6 +513,28 @@ static void
 }
 
 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 @@ parse_settings(xmlnode *node, PurpleAcco
 	/* 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);


More information about the Commits mailing list