forked from CringeStudios/gamja
lib/irc: fix formatMessage when last arg starts with colon
Fixes: a51be5037d3f ("lib/irc: only add colon to trailing arg when necessary")
This commit is contained in:
parent
76f097e8a8
commit
f17d61ed86
@ -218,7 +218,7 @@ export function formatMessage(msg) {
|
|||||||
s += " " + msg.params.slice(0, -1).join(" ");
|
s += " " + msg.params.slice(0, -1).join(" ");
|
||||||
|
|
||||||
let last = String(msg.params[msg.params.length - 1]);
|
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;
|
s += " :" + last;
|
||||||
} else {
|
} else {
|
||||||
s += " " + last;
|
s += " " + last;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user