From fc34fb5d0b717d90edfc7ed78f11166eb23c536e Mon Sep 17 00:00:00 2001 From: Sven Moritz Hallberg Date: Fri, 13 Mar 2009 12:31:47 +0100 Subject: dont specify a background when coloring encrypted messages --- otr.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'otr.c') diff --git a/otr.c b/otr.c index 8d12361b..d69b9a87 100644 --- a/otr.c +++ b/otr.c @@ -349,7 +349,14 @@ char *otr_handle_message(struct im_connection *ic, const char *handle, const cha color=3; /* green */ else color=5; /* red */ - colormsg = g_strdup_printf("\x03%.2d,00%s\x0F", color, newmsg); + + if(newmsg[0] == ',') { + /* could be a problem with the color code */ + /* insert a space between color spec and message */ + colormsg = g_strdup_printf("\x03%.2d %s\x0F", color, newmsg); + } else { + colormsg = g_strdup_printf("\x03%.2d%s\x0F", color, newmsg); + } } else { colormsg = g_strdup(newmsg); } -- cgit v1.2.3