diff src/protocols/yahoo/yahoo.c @ 11800:32bac0647037

[gaim-migrate @ 14091] Patch from Peter Lawler that adds a blist menu option for the whiteboard/doodle feature and also cleaned up the call of the whiteboard, so it's a little more generic. With a tweak from me. committer: Tailor Script <tailor@pidgin.im>
author Gary Kramlich <grim@reaperworld.com>
date Mon, 24 Oct 2005 20:56:12 +0000
parents 11e95968c9ff
children 81806e9241be
line wrap: on
line diff
--- a/src/protocols/yahoo/yahoo.c	Mon Oct 24 20:33:06 2005 +0000
+++ b/src/protocols/yahoo/yahoo.c	Mon Oct 24 20:56:12 2005 +0000
@@ -709,6 +709,10 @@
 	// Check for the Doodle IMV
 	if( !strcmp( imv, "doodle;11" ) )
 	{
+		if (!yahoo_privacy_check(gc, im->from)) {
+			gaim_debug_info("yahoo", "Doodle request from %s dropped.\n", im->from);
+			return;
+		}
 		GaimWhiteboard *wb;
 
 		g_print( "'doodle;11' found in chat packet\n" );
@@ -2858,6 +2862,14 @@
 	return m;
 }
 
+static void yahoo_doodle_blist_node(GaimBlistNode *node, gpointer data)
+{
+	GaimBuddy *b = (GaimBuddy *)node;
+	GaimConnection *gc = b->account->gc;
+
+	yahoo_doodle_initiate(gc, b->name);
+}
+
 static GList *yahoo_buddy_menu(GaimBuddy *buddy)
 {
 	GList *m = NULL;
@@ -2916,6 +2928,12 @@
 		m = g_list_append(m, act);
 	}
 
+	if (f) {
+		act = gaim_blist_node_action_new(_("Start Doodling"),
+				yahoo_doodle_blist_node, NULL, NULL);
+		m = g_list_append(m, act);
+	}
+
 	return m;
 }