From 5fe6d5a0c4d52b6ee2ff1c9338deb02c2a014707 Mon Sep 17 00:00:00 2001 From: ChomeNS Date: Sun, 4 Sep 2022 18:51:35 +0700 Subject: [PATCH] ops --- plugins/chat.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/chat.js b/plugins/chat.js index 103376d..f0071eb 100644 --- a/plugins/chat.js +++ b/plugins/chat.js @@ -31,12 +31,12 @@ function inject(bot) { } else if (raw.match(/.* .*\u203a .*/g)) { // if (packet.sender === '00000000-0000-0000-0000-000000000000') return; const username = raw.replace(/.*?\[.*?\] /g, '').replace(/\u203a.*/g, '').replace(/§#....../gm, '').split(' ')[0]; - const message = raw.split('\u203a ')[1]; + const message = raw.split('\u203a ')[1].substr(2); bot.emit('message', username, message, packet.sender); } else if (raw.match(/.* .*\u00BB .*/g)) { // if (packet.sender === '00000000-0000-0000-0000-000000000000') return; const username = raw.replace(/.*?\[.*?\] /g, '').replace(/\u00BB.*/g, '').replace(/§#....../gm, '').split(' ')[0]; - const message = raw.split('\u00BB ')[1]; + const message = raw.split('\u00BB ')[1].substr(2); bot.emit('message', username, message, packet.sender); } else if (raw.match(/<.*§r> .*/g)) { // if (packet.sender === '00000000-0000-0000-0000-000000000000') return;