changeset 15422:da62cc01dd56

Patch #1600087 from Richard 'wabz' Nelson: "Don't include a buddy's name when logging error/raw messages"
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Fri, 26 Jan 2007 04:34:30 +0000
parents 6d8728fd3dda
children 051a5c4f0917 c218d8839902
files libpurple/log.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/log.c	Fri Jan 26 04:10:22 2007 +0000
+++ b/libpurple/log.c	Fri Jan 26 04:34:30 2007 +0000
@@ -464,7 +464,7 @@
 	/* The account isn't hashed because we need GaimLogSets with NULL accounts
 	 * to be found when we search by a GaimLogSet that has a non-NULL account
 	 * but the same type and name. */
-	return g_int_hash((gint *)&set->type) + g_str_hash(set->name);
+	return g_int_hash(&set->type) + g_str_hash(set->name);
 }
 
 static gboolean
@@ -1105,6 +1105,8 @@
 	} else {
 		if (type & GAIM_MESSAGE_SYSTEM)
 			written += fprintf(data->file, "<font size=\"2\">(%s)</font><b> %s</b><br/>\n", date, msg_fixed);
+		else if (type & GAIM_MESSAGE_RAW)
+			written += fprintf(data->file, "<font size=\"2\">(%s)</font> %s<br/>\n", date, msg_fixed);
 		else if (type & GAIM_MESSAGE_ERROR)
 			written += fprintf(data->file, "<font color=\"#FF0000\"><font size=\"2\">(%s)</font><b> %s</b></font><br/>\n", date, msg_fixed);
 		else if (type & GAIM_MESSAGE_WHISPER)
@@ -1256,7 +1258,9 @@
 					written += fprintf(data->file, "(%s) %s: %s\n", date, from,
 							stripped);
 			}
-		} else if (type & GAIM_MESSAGE_SYSTEM)
+		} else if (type & GAIM_MESSAGE_SYSTEM ||
+			type & GAIM_MESSAGE_ERROR ||
+			type & GAIM_MESSAGE_RAW)
 			written += fprintf(data->file, "(%s) %s\n", date, stripped);
 		else if (type & GAIM_MESSAGE_NO_LOG) {
 			/* This shouldn't happen */