changeset 5305:d2732160850b

[gaim-migrate @ 5677] David Brigada (jsi) writes: " This patch makes it so that Gaim doesn't emit the signal for "buddy is not away" when a buddy logs off if the buddy wasn't away in the first place. This was causing unsightly clutter in conversation windows with the buddy status notification plugin." committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Tue, 06 May 2003 00:11:23 +0000
parents 51903cf0c039
children ce07077982c4
files src/blist.c
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/blist.c	Tue May 06 00:10:12 2003 +0000
+++ b/src/blist.c	Tue May 06 00:11:23 2003 +0000
@@ -140,13 +140,15 @@
 		return;
 
 	ops = gaimbuddylist->ui_ops;
-	buddy->uc = status;
 
-	if(!(status & UC_UNAVAILABLE))
-		gaim_event_broadcast(event_buddy_back, buddy->account->gc, buddy->name);
-	else
-		gaim_event_broadcast(event_buddy_away, buddy->account->gc, buddy->name);
+	if((status & UC_UNAVAILABLE) != (buddy->uc & UC_UNAVAILABLE)) {
+		if(status & UC_UNAVAILABLE)
+			gaim_event_broadcast(event_buddy_away, buddy->account->gc, buddy->name);
+		else
+			gaim_event_broadcast(event_buddy_back, buddy->account->gc, buddy->name);
+	}
 
+	buddy->uc = status;
 	if (ops)
 		ops->update(gaimbuddylist, (GaimBlistNode*)buddy);
 }