changeset 20141:0f90adb5618d

Include real names in system log messags. Fixes #3130
author Sean Egan <seanegan@gmail.com>
date Tue, 18 Sep 2007 00:50:08 +0000
parents 5dee4e3f09eb
children 48374dc14adc
files libpurple/status.c
diffstat 1 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/status.c	Mon Sep 17 22:11:39 2007 +0000
+++ b/libpurple/status.c	Tue Sep 18 00:50:08 2007 +0000
@@ -601,7 +601,7 @@
 	{
 		time_t current_time = time(NULL);
 		const char *buddy_alias = purple_buddy_get_alias(buddy);
-		char *tmp;
+		char *tmp, *logtmp;
 		PurpleLog *log;
 
 		if (old_status != NULL)
@@ -609,6 +609,10 @@
 			tmp = g_strdup_printf(_("%s changed status from %s to %s"), buddy_alias,
 			                      purple_status_get_name(old_status),
 			                      purple_status_get_name(new_status));
+			logtmp = g_strdup_printf(_("%s (%s) changed status from %s to %s"), buddy_alias, buddy->name,
+			                      purple_status_get_name(old_status),
+			                      purple_status_get_name(new_status));
+
 		}
 		else
 		{
@@ -618,11 +622,16 @@
 			{
 				tmp = g_strdup_printf(_("%s is now %s"), buddy_alias,
 				                      purple_status_get_name(new_status));
+				logtmp = g_strdup_printf(_("%s (%s) is now %s"), buddy_alias, buddy->name,
+				                      purple_status_get_name(new_status));
+
 			}
 			else
 			{
 				tmp = g_strdup_printf(_("%s is no longer %s"), buddy_alias,
 				                      purple_status_get_name(new_status));
+				logtmp = g_strdup_printf(_("%s (%s) is no longer %s"), buddy_alias, buddy->name,
+				                      purple_status_get_name(new_status));
 			}
 		}
 
@@ -630,10 +639,11 @@
 		if (log != NULL)
 		{
 			purple_log_write(log, PURPLE_MESSAGE_SYSTEM, buddy_alias,
-			               current_time, tmp);
+			               current_time, logtmp);
 		}
 
 		g_free(tmp);
+		g_free(logtmp);
 	}
 }