changeset 10831:ea65b2abd8d2

[gaim-migrate @ 12499] Fix bug #1083465 - don't automatically add yourself to your buddy list with the gevolution plugin, this is probably what caused complaint #59 that Ubuntu interface designer had. committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Sat, 16 Apr 2005 16:53:05 +0000
parents 692da861f43c
children 9d288fd77d3b
files plugins/gevolution/gevolution.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/gevolution/gevolution.c	Sat Apr 16 16:28:44 2005 +0000
+++ b/plugins/gevolution/gevolution.c	Sat Apr 16 16:53:05 2005 +0000
@@ -25,6 +25,7 @@
 #include "debug.h"
 #include "prefs.h"
 #include "signals.h"
+#include "util.h"
 #include "version.h"
 
 #include "gtkblist.h"
@@ -75,6 +76,7 @@
 	{
 		GaimConnection *gc = (GaimConnection *)l->data;
 		GaimAccount *account = gaim_connection_get_account(gc);
+		char *me = g_strdup(gaim_normalize(account, gaim_account_get_username(account)));
 
 		if (strcmp(gaim_account_get_protocol_id(account), prpl_id))
 			continue;
@@ -84,11 +86,13 @@
 
 		for (l2 = ims; l2 != NULL; l2 = l2->next)
 		{
-			if (gaim_find_buddy(account, l2->data) != NULL)
+			if (gaim_find_buddy(account, l2->data) != NULL ||
+				!strcmp(me, gaim_normalize(account, l2->data)))
 				continue;
 
 			gevo_add_buddy(account, _("Buddies"), l2->data, name);
 		}
+		g_free(me);
 	}
 
 	g_list_foreach(ims, (GFunc)g_free, NULL);