# HG changeset patch
# User John Bailey <rekkanoryo@rekkanoryo.org>
# Date 1236059661 0
# Node ID f98049a447f2271cb1e591622b1540203a1c8de1
# Parent  f2bbf82ffb89e53944a5a3ca4c24a72df3e0289f
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.

diff -r f2bbf82ffb89 -r f98049a447f2 ChangeLog
--- a/ChangeLog	Tue Mar 03 05:13:52 2009 +0000
+++ b/ChangeLog	Tue Mar 03 05:54:21 2009 +0000
@@ -18,6 +18,9 @@
 	* Pressing the Enter key in the message entry box of the New Status
 	  dialog and various other dialogs now causes the cursor to move to
 	  the next line.
+	* Authentication failures now clear the account password, causing Pidgin
+	  to prompt for the password when clicking the "Re-enable" button on the
+	  minidialog.
 
 version 2.5.5 (03/01/2009):
 	libpurple:
diff -r f2bbf82ffb89 -r f98049a447f2 pidgin/gtkconn.c
--- 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. */