--- remote.c	2005-06-23 08:04:17.000000000 +0530
+++ /home/gopalv/hacks/gaim-1.5.0/plugins/gaim-remote/remote.c	2006-03-30 05:42:06.000000000 +0530
@@ -80,7 +80,8 @@
 		account = gaim_connection_get_account(gc);
 		username = gaim_account_get_username(account);
 
-		if (strcmp(gaim_account_get_protocol_id(account), "prpl-oscar") == 0 &&
+		if ((strcmp(gaim_account_get_protocol_id(account), "prpl-oscar") == 0 ||
+			strcmp(gaim_account_get_protocol_id(account), "prpl-yahoo") == 0) &&
 			username != NULL && isalpha(*username)) {
 
 			break;
@@ -88,8 +89,8 @@
 	}
 
 	if (gc == NULL)
-		return _("Not connected to AIM");
-
+		return _("Not connected to AIM or Yahoo!");
+	
  	/* aim:goim?screenname=screenname&message=message */
 	if (!g_ascii_strncasecmp(uri, "aim:goim?", strlen("aim:goim?"))) {
 		char *who, *what;
@@ -191,8 +192,37 @@
 
 		serv_join_chat(gc, components);
 		g_hash_table_destroy(components);
+	} 
+	/* ymsgr:SendIM?<yahoo_id> */
+	else if (!g_ascii_strncasecmp(uri, "ymsgr:SendIM?", strlen("ymsgr:SendIM?"))) {
+		char *who;
+		char *msg;
+		GaimConversation *c;
+		uri = uri + strlen("ymsgr:SendIM?");
+		who = g_strdup(uri);
+		/* we don't want to implement messages, dude */
+		if((msg = strchr(who, '&')) != NULL) {
+			*msg = '\0';
+		}
+		c = gaim_conversation_new(GAIM_CONV_IM, gc->account, who);
+		g_free(who);
+	}
+	else if (!g_ascii_strncasecmp(uri, "ymsgr:addfriend?", strlen("ymsgr:addfriend?"))) {
+		char *who, *group;
+		uri = uri + strlen("ymsgr:addfriend?");
+		/* spaces are encoded as +'s */
+
+		who = g_strdup(uri);
+		/* we don't want to implement anything else, dude */
+		if((group = strchr(who, '&')) != NULL) {
+			*group = '\0';
+		}
+
+		gaim_debug(GAIM_DEBUG_MISC, "gaim_remote_handle_uri", "who: %s\n", who);
+		gaim_blist_request_add_buddy(gc->account, who, "", NULL);
+		g_free(who);
 	} else {
-		return _("Invalid AIM URI");
+		return _("Invalid AIM/Yahoo! URI");
 	}
 	
 	
