aboutsummaryrefslogtreecommitdiffstats
path: root/otr.c
diff options
context:
space:
mode:
authorunknown <pesco@khjk.org>2011-10-03 17:48:01 +0200
committerunknown <pesco@khjk.org>2011-10-03 17:48:01 +0200
commitaea22cd1e0e955848c143a8fc36978391e9a4846 (patch)
treecc155a50e415a8f4d66eb0d88658efa731261072 /otr.c
parent409c2dec87731dae72dfbaae6b3fdf4a9c53dea2 (diff)
otr: only skip coloring of leading /me if the message will go to a query window
Diffstat (limited to 'otr.c')
-rw-r--r--otr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/otr.c b/otr.c
index bb6f8b07..5b36a228 100644
--- a/otr.c
+++ b/otr.c
@@ -413,14 +413,15 @@ char *otr_filter_msg_in(irc_user_t *iu, char *msg, int flags)
else
color=5; /* red */
- /* keep "/me " uncolored at the beginning */
- if (g_strncasecmp(msg, "/me ", 4) == 0) {
+ /* in a query window, keep "/me " uncolored at the beginning */
+ if(g_strncasecmp(msg, "/me ", 4) == 0
+ && irc_user_msgdest(iu) == irc->user->nick) {
msg += 4; /* skip */
pre = "/me ";
}
/* comma in first place could mess with the color code */
- if (msg[0] == ',') {
+ if(msg[0] == ',') {
/* insert a space between color spec and message */
sep = " ";
}