diff pidgin/gtkconn.c @ 25448:f98049a447f2

Clear the saved password on an authentication failure. The result of this is that clicking "Re-enable" on the minidialog in the buddy list will request the user to enter the password again. Fixes #183.
author John Bailey <rekkanoryo@rekkanoryo.org>
date Tue, 03 Mar 2009 05:54:21 +0000
parents 15d6fd6b08a2
children a4fea5757d27
line wrap: on
line diff
--- a/pidgin/gtkconn.c	Tue Mar 03 05:13:52 2009 +0000
+++ b/pidgin/gtkconn.c	Tue Mar 03 05:54:21 2009 +0000
@@ -163,6 +163,11 @@
 			g_hash_table_remove(auto_reconns, account);
 
 		purple_account_set_enabled(account, PIDGIN_UI, FALSE);
+
+		/* clear the saved password if this is an authentication failure */
+		if(reason == PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED)
+			purple_account_set_password(account, NULL);
+			
 	}
 
 	/* If we have any open chats, we probably want to rejoin when we get back online. */