From 34ea1152609d8aabe99344ec75c684978b0e970e Mon Sep 17 00:00:00 2001 From: Flummi Date: Sun, 2 Sep 2018 17:44:00 +0200 Subject: [PATCH] irc colors --- src/clients/irc.mjs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/clients/irc.mjs b/src/clients/irc.mjs index a4aafc3..0d9fbb7 100644 --- a/src/clients/irc.mjs +++ b/src/clients/irc.mjs @@ -8,10 +8,10 @@ import tls from "tls"; import EventEmitter from "events"; const colors = { - red: "\x0304$1\x0304", - blue: "\x0312$1\x0312", - yellow: "\x0308$1\x0308", - green: "\x0303$1\x0303" + red: "04", + blue: "12", + yellow: "08", + green: "03" // \x0F }; const msgmodes = { normal: "PRIVMSG {recipient} :{msg}", @@ -21,7 +21,7 @@ const msgmodes = { const replaceColor = (match, color, text) => { if (colors.hasOwnProperty(color)) - return colors[color].replace("\$1", text); + return `\x03${colors[color]}${text}\x0F`; return text; };