This commit is contained in:
ChomeNS 2022-09-17 15:06:17 +07:00
parent 21ccaeb18f
commit a623048d1e

View file

@ -212,6 +212,7 @@ function main() {
}, 1000); }, 1000);
consoleQueueInterval = setInterval(function() { consoleQueueInterval = setInterval(function() {
if (consoleQueue.length > 50) consoleQueue = [];
if (consoleQueue[0] || consoleQueue[0]==='') { if (consoleQueue[0] || consoleQueue[0]==='') {
console.log(bot.options.host + ': ' + consoleQueue[0].substring(0, 10000)/* message.toAnsi() + '\u001b[0m'*/); console.log(bot.options.host + ': ' + consoleQueue[0].substring(0, 10000)/* message.toAnsi() + '\u001b[0m'*/);
consoleQueue.shift(); consoleQueue.shift();
@ -496,9 +497,8 @@ dcclient.on('ready', async () => {
fs.writeFileSync('./notonline.txt', 'false'); fs.writeFileSync('./notonline.txt', 'false');
return; return;
} }
if (line.toLowerCase()==='.resethash') { if (line==='.clearconsolequeue') {
bot.hash = randomstring.generate(16); consoleQueue = [];
console.log('new hash: ' + bot.hash);
return; return;
} }
// if (line.startsWith("."))return console.log('command not found') // if (line.startsWith("."))return console.log('command not found')