# HG changeset patch # User Sadrul Habib Chowdhury # Date 1169786070 0 # Node ID da62cc01dd56903603fcd157b3ef8bc30daca976 # Parent 6d8728fd3ddad7d8af6ee2a34ae00a8ab5602153 Patch #1600087 from Richard 'wabz' Nelson: "Don't include a buddy's name when logging error/raw messages" diff -r 6d8728fd3dda -r da62cc01dd56 libpurple/log.c --- 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, "(%s) %s
\n", date, msg_fixed); + else if (type & GAIM_MESSAGE_RAW) + written += fprintf(data->file, "(%s) %s
\n", date, msg_fixed); else if (type & GAIM_MESSAGE_ERROR) written += fprintf(data->file, "(%s) %s
\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 */