Fix double space introduced before last param

This commit is contained in:
Hubert Hirtz 2021-09-17 13:14:23 +02:00 committed by Simon Ser
parent 9f0177dea0
commit f78cb8c23b

View file

@ -215,7 +215,9 @@ export function formatMessage(msg) {
}
s += msg.command;
if (msg.params && msg.params.length > 0) {
s += " " + msg.params.slice(0, -1).join(" ");
for (let i = 0; i < msg.params.length - 1; i++) {
s += " " + msg.params[i]
}
let last = String(msg.params[msg.params.length - 1]);
if (last.length === 0 || last.startsWith(":") || last.indexOf(" ") >= 0) {