From 972a0cad0f21f5782e159a387bd0b138be2a052a Mon Sep 17 00:00:00 2001 From: ChomeNS Date: Wed, 24 Aug 2022 17:12:40 +0700 Subject: [PATCH] \u203a support 1!1 !11!! --- plugins/chat.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/chat.js b/plugins/chat.js index 2fbebb4..fcbcf25 100644 --- a/plugins/chat.js +++ b/plugins/chat.js @@ -28,6 +28,11 @@ function inject(bot) { const username = raw.replace(/.*?\[.*?\] /, '').replace(/:.*/g, '').replace(/§#....../gm, ''); const message = raw.split(': ')[1]; bot.emit('message', username, message, packet.sender); + } else if (raw.match(/.* .* \u203a .*/g)) { + // if (packet.sender === '00000000-0000-0000-0000-000000000000') return; + const username = raw.replace(/.*?\[.*?\] /, '').replace(/ \u203a.*/g, '').replace(/§#....../gm, ''); + const message = raw.split(' \u203a ')[1]; + bot.emit('message', username, message, packet.sender); } else if (raw.match(/<.*§r> .*/g)) { // if (packet.sender === '00000000-0000-0000-0000-000000000000') return;