From f17d61ed86d349a5d4bce90a64f1c416814be30f Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 8 Sep 2021 10:42:36 +0200 Subject: [PATCH] lib/irc: fix formatMessage when last arg starts with colon Fixes: a51be5037d3f ("lib/irc: only add colon to trailing arg when necessary") --- lib/irc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/irc.js b/lib/irc.js index 5ee4a9c..65f9949 100644 --- a/lib/irc.js +++ b/lib/irc.js @@ -218,7 +218,7 @@ export function formatMessage(msg) { s += " " + msg.params.slice(0, -1).join(" "); let last = String(msg.params[msg.params.length - 1]); - if (last.length === 0 || last === ":" || last.indexOf(" ") >= 0) { + if (last.length === 0 || last.startsWith(":") || last.indexOf(" ") >= 0) { s += " :" + last; } else { s += " " + last;