aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Moritz Hallberg <pesco@khjk.org>2009-03-13 12:31:47 +0100
committerSven Moritz Hallberg <pesco@khjk.org>2009-03-13 12:31:47 +0100
commitfc34fb5d0b717d90edfc7ed78f11166eb23c536e (patch)
treeefe1cf653c46544a74dc0bf430ce3125769002cd
parent673a54c5a78afd1dd41b4cd8811df5ab65042583 (diff)
dont specify a background when coloring encrypted messages
-rw-r--r--otr.c9
1 files changed, 8 insertions, 1 deletions
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);
}