--- a/mcabber/src/hooks.c Mon Aug 27 13:02:16 2007 +0200
+++ b/mcabber/src/hooks.c Sun Aug 26 18:24:14 2007 +0200
@@ -49,6 +49,7 @@
guint rtype = ROSTER_TYPE_USER;
char *wmsg = NULL, *bmsg = NULL, *mmsg = NULL;
GSList *roster_usr;
+ unsigned mucnicklen = 0;
if (encrypted)
message_flags |= HBB_PREFIX_PGPCRYPT;
@@ -63,6 +64,7 @@
wmsg = bmsg = g_strdup_printf("~ %s", msg);
} else {
wmsg = bmsg = g_strdup_printf("<%s> %s", resname, msg);
+ mucnicklen = strlen(resname) + 2;
if (!strncmp(msg, COMMAND_ME, strlen(COMMAND_ME)))
wmsg = mmsg = g_strdup_printf("*%s %s", resname, msg+4);
}
@@ -157,7 +159,7 @@
// Note: the hlog_write should not be called first, because in some
// cases scr_WriteIncomingMessage() will load the history and we'd
// have the message twice...
- scr_WriteIncomingMessage(bjid, wmsg, timestamp, message_flags);
+ scr_WriteIncomingMessage(bjid, wmsg, timestamp, message_flags, mucnicklen);
// We don't log the modified message, but the original one
if (wmsg == mmsg)
@@ -306,7 +308,7 @@
imstatus2char[oldstat], imstatus2char[status],
((status_msg) ? status_msg : ""));
scr_WriteIncomingMessage(bjid, bn, timestamp,
- HBB_PREFIX_INFO|HBB_PREFIX_NOFLAG);
+ HBB_PREFIX_INFO|HBB_PREFIX_NOFLAG, 0);
g_free(bn);
}
}