changeset 17580:42a6171a3b25

merge of '8076670c76ed171ce5bc373a596dfd98c5458d91' and 'dcb937559830ec1750888127573b88946b88c52f'
author Stu Tomlinson <stu@nosnilmot.com>
date Sun, 10 Jun 2007 17:18:50 +0000
parents 2c425e60fb1d (current diff) 210fc36306e4 (diff)
children 17f798ec0a2f
files
diffstat 2 files changed, 21 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/notification.c	Sun Jun 10 17:12:00 2007 +0000
+++ b/libpurple/protocols/msn/notification.c	Sun Jun 10 17:18:50 2007 +0000
@@ -591,12 +591,23 @@
 static void
 qng_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd)
 {
+	MsnSession *session;
 	static int count = 0;
-	MsnSession *session = cmdproc->session;
+	const char *passport;
+	PurpleAccount *account;
+
+	session = cmdproc->session;
+	account = session->account;
 
 	if (session->passport_info.file == NULL)
 		return;
 
+	passport = purple_normalize(account, purple_account_get_username(account));
+
+	if ((strstr(passport, "@hotmail.") != NULL) ||
+		(strstr(passport, "@msn.com") != NULL))
+		return;
+
 	if (count++ < 26)
 		return;
 
--- a/libpurple/protocols/msn/session.c	Sun Jun 10 17:12:00 2007 +0000
+++ b/libpurple/protocols/msn/session.c	Sun Jun 10 17:18:50 2007 +0000
@@ -386,6 +386,7 @@
 	PurpleAccount *account;
 	PurpleConnection *gc;
 	PurpleStoredImage *img;
+	const char *passport;
 
 	if (session->logged_in)
 		return;
@@ -409,5 +410,12 @@
 	 * and @msn.com accounts don't automatically get the initial email
 	 * notification so we always request it on login
 	 */
-	msn_cmdproc_send(session->notification->cmdproc, "URL", "%s", "INBOX");
+
+	passport = purple_normalize(account, purple_account_get_username(account));
+
+	if ((strstr(passport, "@hotmail.") != NULL) ||
+		(strstr(passport, "@msn.com") != NULL))
+	{
+		msn_cmdproc_send(session->notification->cmdproc, "URL", "%s", "INBOX");
+	}
 }