All pastes #1472876 Raw Edit

Someone

public text v1 · immutable
#1472876 ·published 2009-06-24 17:35 UTC
rendered paste body
diff -Nur pidgin-2.5.7.orig/libpurple/protocols/yahoo/yahoo.c pidgin-2.5.7/libpurple/protocols/yahoo/yahoo.c
--- pidgin-2.5.7.orig/libpurple/protocols/yahoo/yahoo.c	2009-06-21 01:34:32.000000000 +0300
+++ pidgin-2.5.7/libpurple/protocols/yahoo/yahoo.c	2009-06-24 20:32:14.726545352 +0300
@@ -72,12 +72,10 @@
 	if (!gc || !name || !f || !purple_find_buddy(purple_connection_get_account(gc), name))
 		return;
 
-	if (f->status == YAHOO_STATUS_OFFLINE)
-	{
-		return;
-	}
-
 	switch (f->status) {
+	case YAHOO_STATUS_OFFLINE:
+       		status = YAHOO_STATUS_TYPE_OFFLINE;
+		break;
 	case YAHOO_STATUS_AVAILABLE:
 		status = YAHOO_STATUS_TYPE_AVAILABLE;
 		break;
@@ -335,11 +333,15 @@
 		l = l->next;
 	}
 
-	if (message && f)
-		yahoo_friend_set_status_message(f, yahoo_string_decode(gc, message, unicode));
+	if (f) {
+		if (pkt->service == YAHOO_SERVICE_LOGOFF)
+			f->status = YAHOO_STATUS_OFFLINE;
+		if (message)
+			yahoo_friend_set_status_message(f, yahoo_string_decode(gc, message, unicode));
 
-	if (name && f) /* update the last buddy */
-		yahoo_update_status(gc, name, f);
+        	if (name) /* update the last buddy */
+	                yahoo_update_status(gc, name, f);
+	}
 }
 
 static void yahoo_do_group_check(PurpleAccount *account, GHashTable *ht, const char *name, const char *group)