~emersion/gamja

f17d61ed86d349a5d4bce90a64f1c416814be30f — Simon Ser 16 days ago 76f097e
lib/irc: fix formatMessage when last arg starts with colon

Fixes: a51be5037d3f ("lib/irc: only add colon to trailing arg when necessary")
1 files changed, 1 insertions(+), 1 deletions(-)

M lib/irc.js
M lib/irc.js => lib/irc.js +1 -1
@@ 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;