changeset 25007:071414f413a4

Properly don't re-add buddies in SILC
author Paul Aurich <paul@darkrain42.org>
date Sun, 21 Dec 2008 22:11:46 +0000
parents 032651900c32
children a4d6e2c1e73b
files libpurple/protocols/silc/buddy.c libpurple/protocols/silc10/buddy.c
diffstat 2 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/silc/buddy.c	Sun Dec 21 19:15:21 2008 +0000
+++ b/libpurple/protocols/silc/buddy.c	Sun Dec 21 22:11:46 2008 +0000
@@ -1390,7 +1390,12 @@
 
 void silcpurple_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group)
 {
-	silcpurple_add_buddy_i(gc, buddy, FALSE);
+	/* Don't add if the buddy is already on the list.
+	 *
+	 * SILC doesn't have groups, so we also don't need to do anything
+	 * for a move. */
+	if (buddy->proto_data == NULL)
+		silcpurple_add_buddy_i(gc, buddy, FALSE);
 }
 
 void silcpurple_send_buddylist(PurpleConnection *gc)
--- a/libpurple/protocols/silc10/buddy.c	Sun Dec 21 19:15:21 2008 +0000
+++ b/libpurple/protocols/silc10/buddy.c	Sun Dec 21 22:11:46 2008 +0000
@@ -1390,7 +1390,12 @@
 
 void silcpurple_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group)
 {
-	silcpurple_add_buddy_i(gc, buddy, FALSE);
+	/* Don't add if the buddy is already on the list.
+	 *
+	 * SILC doesn't have groups, so we don't need to do anything
+	 * for a move. */
+	if (buddy->proto_data == NULL)
+		silcpurple_add_buddy_i(gc, buddy, FALSE);
 }
 
 void silcpurple_send_buddylist(PurpleConnection *gc)