Mercurial > pidgin
comparison plugins/gevolution/gevolution.c @ 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 | 54ac161a876e |
children | 5cda52915a1f |
comparison
equal
deleted
inserted
replaced
10830:692da861f43c | 10831:ea65b2abd8d2 |
---|---|
23 | 23 |
24 #include "connection.h" | 24 #include "connection.h" |
25 #include "debug.h" | 25 #include "debug.h" |
26 #include "prefs.h" | 26 #include "prefs.h" |
27 #include "signals.h" | 27 #include "signals.h" |
28 #include "util.h" | |
28 #include "version.h" | 29 #include "version.h" |
29 | 30 |
30 #include "gtkblist.h" | 31 #include "gtkblist.h" |
31 #include "gtkconv.h" | 32 #include "gtkconv.h" |
32 #include "gtkplugin.h" | 33 #include "gtkplugin.h" |
73 | 74 |
74 for (l = gaim_connections_get_all(); l != NULL; l = l->next) | 75 for (l = gaim_connections_get_all(); l != NULL; l = l->next) |
75 { | 76 { |
76 GaimConnection *gc = (GaimConnection *)l->data; | 77 GaimConnection *gc = (GaimConnection *)l->data; |
77 GaimAccount *account = gaim_connection_get_account(gc); | 78 GaimAccount *account = gaim_connection_get_account(gc); |
79 char *me = g_strdup(gaim_normalize(account, gaim_account_get_username(account))); | |
78 | 80 |
79 if (strcmp(gaim_account_get_protocol_id(account), prpl_id)) | 81 if (strcmp(gaim_account_get_protocol_id(account), prpl_id)) |
80 continue; | 82 continue; |
81 | 83 |
82 if (!gaim_account_get_bool(account, "gevo-autoadd", FALSE)) | 84 if (!gaim_account_get_bool(account, "gevo-autoadd", FALSE)) |
83 continue; | 85 continue; |
84 | 86 |
85 for (l2 = ims; l2 != NULL; l2 = l2->next) | 87 for (l2 = ims; l2 != NULL; l2 = l2->next) |
86 { | 88 { |
87 if (gaim_find_buddy(account, l2->data) != NULL) | 89 if (gaim_find_buddy(account, l2->data) != NULL || |
90 !strcmp(me, gaim_normalize(account, l2->data))) | |
88 continue; | 91 continue; |
89 | 92 |
90 gevo_add_buddy(account, _("Buddies"), l2->data, name); | 93 gevo_add_buddy(account, _("Buddies"), l2->data, name); |
91 } | 94 } |
95 g_free(me); | |
92 } | 96 } |
93 | 97 |
94 g_list_foreach(ims, (GFunc)g_free, NULL); | 98 g_list_foreach(ims, (GFunc)g_free, NULL); |
95 g_list_free(ims); | 99 g_list_free(ims); |
96 } | 100 } |