Skip to content

Commit

Permalink
Version 1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
WojtekMR3 committed Mar 25, 2020
1 parent b661a05 commit d784764
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion TS3RankingENG.js
@@ -1,6 +1,6 @@
registerPlugin({
name: 'TS3 Ranking',
version: '1.1',
version: '1.2',
description: 'Count time. Grant levels. Display top clients on channel.',
author: 'R3flex <r3flexmlg@gmail.com>',
vars: {
Expand Down Expand Up @@ -152,6 +152,9 @@ event.on('chat', function(ev) {
let time = entry.time;
export_db[uid] = {nick: nick, time: time};
});
// Check if length of exporting DB doesn't exceed 8192 characters.
let len = "!import_db".length + JSON.stringify(export_db).length;
if (len > 8192) return client.chat(format.bold(`${format.color("Error DB is too large!","#ff3e3e")} Try lowering export limit.`));
client.chat(format.bold(`${format.color("Exporting succesful!", "#00bf00")} Exported ${db_sorted.length} sets`));
client.chat(`${format.bold("!import_db")} ${JSON.stringify(export_db)}`);
}
Expand Down

0 comments on commit d784764

Please sign in to comment.