# HG changeset patch # User Stu Tomlinson # Date 1179536435 0 # Node ID 3e463ddf18f7bab21935cec339cc1df4d2f971c2 # Parent 9c8172ddc72dfc2d632a050586939182e90920d7 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 diff -r 9c8172ddc72d -r 3e463ddf18f7 libpurple/protocols/msn/notification.c --- 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);