changeset 12668:57462d6542ea

[gaim-migrate @ 15011] Fix SF Bug #1391106 When logging to the system log, we made no distinction between signing off/on and going away / coming back. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Thu, 29 Dec 2005 00:44:11 +0000
parents a99a0cc67713
children 879f90dbd21f
files src/status.c
diffstat 1 files changed, 18 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/status.c	Thu Dec 29 00:21:53 2005 +0000
+++ b/src/status.c	Thu Dec 29 00:44:11 2005 +0000
@@ -616,15 +616,27 @@
 		const char *buddy_alias = gaim_buddy_get_alias(buddy);
 		char *tmp = NULL;
 
-		if (((old_status == NULL) || !gaim_status_is_available(old_status)) &&
-				gaim_status_is_available(new_status))
+		if (gaim_status_is_available(new_status))
 		{
-			tmp = g_strdup_printf(_("%s came back"), buddy_alias);
+			if (((old_status == NULL) || !gaim_status_is_online(old_status)))
+			{
+				tmp = g_strdup_printf(_("%s signed on"), buddy_alias);
+			}
+			else if (!gaim_status_is_available(old_status))
+			{
+				tmp = g_strdup_printf(_("%s came back"), buddy_alias);
+			}
 		}
-		else if ((old_status != NULL) && gaim_status_is_available(old_status) &&
-				!gaim_status_is_available(new_status))
+		else if ((old_status != NULL) && gaim_status_is_available(old_status))
 		{
-			tmp = g_strdup_printf(_("%s went away"), buddy_alias);
+			if (!gaim_status_is_online(new_status))
+			{
+				tmp = g_strdup_printf(_("%s signed off"), buddy_alias);
+			}
+			else if (!gaim_status_is_available(new_status))
+			{
+				tmp = g_strdup_printf(_("%s went away"), buddy_alias);
+			}
 		}
 
 		if (tmp != NULL)