diff --git a/ircbot.js b/ircbot.js index c672356..ce23397 100644 --- a/ircbot.js +++ b/ircbot.js @@ -65,11 +65,14 @@ function ircbotRun(program, input, maxCycles = 400000) { // Replace all characters < 0x20 except for IRC formatting codes // with their graphical representations at U+24xx + // Also replace DEL with U+2421 let formattingChars = [0x02, 0x03, 0x0f, 0x12, 0x15]; output = Array.from(output).map(c => { let codePoint = c.codePointAt(0); if(codePoint < 0x20 && !formattingChars.includes(codePoint)) { return String.fromCodePoint(0x2400 + codePoint); + } else if(codePoint == 0x7f) { + return String.fromCodePoint(0x2421); } else { return c; }