diff --git a/plugins/chat.js b/plugins/chat.js index 69ea555..6a7157e 100644 --- a/plugins/chat.js +++ b/plugins/chat.js @@ -18,6 +18,7 @@ function inject(bot) { bot.on('parsed_chat', (message, packet) => { try { const raw = message.toMotd().substring(0, 32767); + console.log(raw) if (raw.match(/.* .*§r: §.*/g)) { // if (packet.sender === '00000000-0000-0000-0000-000000000000') return; const username = raw.replace(/.*?\[.*?\] /, '').replace(/:.*/g, '').replace(/§#....../gm, ''); @@ -32,7 +33,7 @@ function inject(bot) { // if (packet.sender === '00000000-0000-0000-0000-000000000000') return; const username = raw.substr(3).split('§r>')[0]; - const message = raw.split('§r> §r')[1]; + const message = raw.split('§r> ')[1]; bot.emit('message', username, message, packet.sender); } else if (raw.match(/<.*> .*/g)) { diff --git a/plugins/self_care.js b/plugins/self_care.js index c3ef7e4..745f969 100644 --- a/plugins/self_care.js +++ b/plugins/self_care.js @@ -13,7 +13,7 @@ function inject(bot) { if (!bot.visibility) { if (data.toString().startsWith('Vanish for ') && data.toString().endsWith('disabled')) vanish = false; } - if (data.toString()==='Successfully enabled CommandSpy' || data.toString()===' Enabled your command spy.') cspy = true; + if (data.toString()==='Successfully enabled CommandSpy' || data.toString()===' Enabled your command spy.' || data.toString()===' Your command spy is already enabled.') cspy = true; if (data.toString()==='Successfully disabled CommandSpy' || data.toString()===' Disabled your command spy.') cspy = false; if (data.toString()==='You now have the tag: [ChomeNS Bot]') { prefix = true;