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