summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/fe-common/core/chat-completion.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/fe-common/core/chat-completion.c b/src/fe-common/core/chat-completion.c
index abb15404..aa619dc9 100644
--- a/src/fe-common/core/chat-completion.c
+++ b/src/fe-common/core/chat-completion.c
@@ -953,8 +953,9 @@ static void event_text(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
}
}
- str = g_strdup_printf(IS_CHANNEL(item) ? "-channel %s %s" :
- IS_QUERY(item) ? "-nick %s %s" : "%s %s",
+ /* use "--" just in case the nick contains '-' character */
+ str = g_strdup_printf(IS_CHANNEL(item) ? "-channel %s -- %s" :
+ IS_QUERY(item) ? "-nick %s -- %s" : "-- %s %s",
window_item_get_target(item), line);
signal_emit("command msg", 3, str, server, item);