diff src/protocols/oscar/oscar.c @ 7297:ceda503e55a6

[gaim-migrate @ 7881] This is AIM Alerts and Reminders (alerts.aol.com). I think this is kinda a cool thing. And it was totally easy to do. Unfortunately, though, it seems that AOL won't give your browser the alert unless you send an X-Aim header in your HTML request. I could parse the HTML myself, but it has, like forms and stuff in it... and some alerts have images... it wouldn't be worth it. So this just prints stuff to the debug window. Maybe someday someone will be able to do something with it. Mark's going to make sure I didn't screw anything up. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Sat, 18 Oct 2003 03:34:14 +0000
parents a50eea7628cb
children 0ed0ac132b1b
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c	Sat Oct 18 02:43:41 2003 +0000
+++ b/src/protocols/oscar/oscar.c	Sat Oct 18 03:34:14 2003 +0000
@@ -3394,10 +3394,13 @@
 	GaimConnection *gc = sess->aux_data;
 	struct aim_emailinfo *emailinfo;
 	int havenewmail;
+	char *alertitle, *alerturl;
 
 	va_start(ap, fr);
 	emailinfo = va_arg(ap, struct aim_emailinfo *);
 	havenewmail = va_arg(ap, int);
+	alertitle = va_arg(ap, char*);
+	alerturl  = va_arg(ap, char*);
 	va_end(ap);
 
 	if (emailinfo && gaim_account_get_check_mail(gc->account)) {
@@ -3406,6 +3409,14 @@
 			gaim_notify_emails(gc, emailinfo->nummsgs, FALSE, NULL, NULL, (const char **)&to, (const char **)&emailinfo->url, NULL, NULL);
 		g_free(to);
 	}
+	
+	if (alertitle) {
+		gaim_debug(GAIM_DEBUG_MISC, "oscar", "Got an alert '%s' %s\n", alertitle, alerturl);
+		g_free(alertitle);
+	} 
+	if (alerturl)
+		g_free(alerturl);
+
 
 	return 1;
 }