# HG changeset patch # User Mikael Berthe # Date 1128703957 -7200 # Node ID 55aa45eb7ece65466fd61cfc8923b6d168b2febc # Parent 00e2d3821a5b2127356adec42068e864c30a94a4 Fix a small display bug diff -r 00e2d3821a5b -r 55aa45eb7ece mcabber/src/hooks.c --- a/mcabber/src/hooks.c Thu Oct 06 21:51:34 2005 +0200 +++ b/mcabber/src/hooks.c Fri Oct 07 18:52:37 2005 +0200 @@ -121,15 +121,17 @@ { char *wmsg = NULL, *bmsg = NULL; - if (nick) { - wmsg = bmsg = g_strdup_printf("PRIV#<%s> %s", nick, msg); - } else { - wmsg = (char*)msg; - // We don't log private messages - hlog_write_message(jid, timestamp, TRUE, msg); - } + if (nick) wmsg = bmsg = g_strdup_printf("PRIV#<%s> %s", nick, msg); + else wmsg = (char*)msg; + // Note: the hlog_write should not be called first, because in some + // cases scr_WriteOutgoingMessage() will load the history and we'd + // have the message twice... scr_WriteOutgoingMessage(jid, wmsg); + + // We don't log private messages + if (!nick) hlog_write_message(jid, timestamp, TRUE, msg); + // External command hk_ext_cmd(jid, 'M', 'S', NULL);