diff src/buddy_chat.c @ 2820:b917845dad3c

[gaim-migrate @ 2833] remove chat reason committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Fri, 30 Nov 2001 21:16:28 +0000
parents f3c094e78609
children 87d11d2a7d59
line wrap: on
line diff
--- a/src/buddy_chat.c	Fri Nov 30 09:51:23 2001 +0000
+++ b/src/buddy_chat.c	Fri Nov 30 21:16:28 2001 +0000
@@ -958,7 +958,7 @@
 }
 
 
-void remove_chat_buddy(struct conversation *b, char *buddy)
+void remove_chat_buddy(struct conversation *b, char *buddy, char *reason)
 {
 	GList *names = b->in_room;
 	GList *items = GTK_LIST(b->list)->children;
@@ -998,7 +998,10 @@
 		play_sound(CHAT_LEAVE);
 
 	if (chat_options & OPT_CHAT_LOGON) {
-		g_snprintf(tmp, sizeof(tmp), _("%s left the room."), buddy);
+		if (reason && *reason)
+			g_snprintf(tmp, sizeof(tmp), _("%s left the room (%s)."), buddy, reason);
+		else
+			g_snprintf(tmp, sizeof(tmp), _("%s left the room."), buddy);
 		write_to_conv(b, tmp, WFLAG_SYSTEM, NULL, time(NULL));
 	}
 }