changeset 17128:3e463ddf18f7

Periodically refresh the authentication info required to automatically log in to Hotmail. I spent far too long trying to figure out what was a suitable period for this only to find it was magic number 26. 26 is the smallest non-palindromic number whose square is palindromic (676) 26 is equal to the sum of the digits of its cube: 26^3 = 17,576 26, together with 11, cannot be represented as the sum of less than 6 hexagonal numbers from the sequence 1 6 15 28 45 ... Fixes #934
author Stu Tomlinson <stu@nosnilmot.com>
date Sat, 19 May 2007 01:00:35 +0000
parents 9c8172ddc72d
children c4237e963099 b3340b359804
files libpurple/protocols/msn/notification.c
diffstat 1 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/notification.c	Fri May 18 15:18:32 2007 +0000
+++ b/libpurple/protocols/msn/notification.c	Sat May 19 01:00:35 2007 +0000
@@ -589,6 +589,19 @@
 }
 
 static void
+qng_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd)
+{
+	static int count = 0;
+
+	if (count++ < 26)
+		return;
+
+	count = 0;
+	msn_cmdproc_send(cmdproc, "URL", "%s", "INBOX");
+}
+
+
+static void
 fln_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd)
 {
 	MsnSlpLink *slplink;
@@ -1405,7 +1418,7 @@
 	msn_table_add_cmd(cbs_table, NULL, "ADD", add_cmd);
 
 	msn_table_add_cmd(cbs_table, NULL, "QRY", NULL);
-	msn_table_add_cmd(cbs_table, NULL, "QNG", NULL);
+	msn_table_add_cmd(cbs_table, NULL, "QNG", qng_cmd);
 	msn_table_add_cmd(cbs_table, NULL, "FLN", fln_cmd);
 	msn_table_add_cmd(cbs_table, NULL, "NLN", nln_cmd);
 	msn_table_add_cmd(cbs_table, NULL, "ILN", iln_cmd);