diff src/protocols/yahoo/yahoo_profile.c @ 9281:adde46ad65e9

[gaim-migrate @ 10084] This keeps track of IP addresses that other clients send us, and displays them in the Get Info dialog. Eventually we'll want to do other stuff with them, probably. committer: Tailor Script <tailor@pidgin.im>
author Tim Ringenbach <marv@pidgin.im>
date Mon, 14 Jun 2004 07:05:10 +0000
parents fb517adf4972
children 2aed8d5cda1b
line wrap: on
line diff
--- a/src/protocols/yahoo/yahoo_profile.c	Mon Jun 14 06:09:26 2004 +0000
+++ b/src/protocols/yahoo/yahoo_profile.c	Mon Jun 14 07:05:10 2004 +0000
@@ -32,6 +32,7 @@
 #endif
 
 #include "yahoo.h"
+#include "yahoo_friend.h"
 
 typedef struct {
 	GaimConnection *gc;
@@ -634,6 +635,7 @@
 static char *yahoo_tooltip_info_text(YahooGetInfoData *info_data) {
 	GString *s = g_string_sized_new(80); /* wild guess */
 	GaimBuddy *b;
+	YahooFriend *f;
 
 	g_string_printf(s, _("<b>%s:</b> %s<br>"), _("Yahoo! ID"), info_data->name);
 	b = gaim_find_buddy(gaim_connection_get_account(info_data->gc),
@@ -656,6 +658,12 @@
 			g_string_append_printf(s, "%s<br>", statustext);
 			g_free(statustext);
 		}
+		if ((f = yahoo_friend_find(info_data->gc, b->name))) {
+			const char *ip;
+			if ((ip = yahoo_friend_get_ip(f)))
+				g_string_append_printf(s, _("<b>IP Address:</b> %s<br>"), ip);
+		}
+
 	}
 
 	return g_string_free(s, FALSE);