<commit_before>'use strict';   // dont touch
const fs = require('fs');
var auth = require('./auth.js');
this.command = []; // dont touch
this.commandName = []; // dont touch
this.gamemodeId = []; // dont touch
this.gamemode = []; // dont touch
this.addToHelp = []; // dont touch

// [General]
this.name = "Auth"; // Name of plugin REQUIRED
this.author = "andrews54757"; // author REQUIRED
this.description = 'An auth plugin'; // Desciprtion
this.compatVersion = ''; // compatable with
this.version = '1.0.0'; // version REQUIRED

// [Extra Commands]
this.commandName[0] = "auth"; // plugin add-on command names
this.addToHelp[0] = "auth     : Auth plugin command"; // help command add-on (adds this string to the help command)
this.command[0] = require('./command.js'); // extra command location

// [Extra Gamemodes]
this.gamemodeId[0] = ''; // gamemodeids of extra plugin gamemodes
this.gamemode[0] = ''; // gamemode location

// [Configs]
this.config = {
requirelogin: 0,
plugin: 1,
allowregister: 1,
recordint: 100,
}
this.configfile = 'config.ini'


// [Functions]
this.init = function (gameServer, config) {
  this.config = config;
  auth.init(this, gameServer);
  gameServer.beforespawn = function(player) {
    
   return auth.beforespawn(player,gameServer);
  };
  gameServer.beforeq = function(player) {
    return auth.beforeq(player, gameServer);
    
  };
  gameServer.beforeeject = function(player) {return auth.beforeeject(player,gameServer);};
  gameServer.beforesplit = function(player) {return auth.beforesplit(player,gameServer);};
  gameServer.account = JSON.parse(fs.readFileSync('accounts.json'));
  gameServer.auon = this.config.plugin;
  console.log("[Auth] Auth loaded. Accounts located in accounts.json")
  // init, Used to do stuff such as overriding things


};

this.onSecond = function (gameServer) {
if (!this.up) this.up = 0;
if (this.up < this.config.recordint) {
  this.up ++;
  
} else {
  this.up = 0;
  fs.writeFileSync('accounts.json',JSON.stringify(gameServer.account, null, 2));
}

  // called every second
};


module.exports = this; // dont touch<commit_msg>Update index.js<commit_after>'use strict';   // dont touch
const fs = require('fs');
var auth = require('./auth.js');
this.command = []; // dont touch
this.commandName = []; // dont touch
this.gamemodeId = []; // dont touch
this.gamemode = []; // dont touch
this.addToHelp = []; // dont touch

// [General]
this.name = "Auth"; // Name of plugin REQUIRED
this.author = "andrews54757"; // author REQUIRED
this.description = 'An auth plugin'; // Desciprtion
this.compatVersion = ''; // compatable with
this.version = '1.0.0'; // version REQUIRED

// [Extra Commands]
this.commandName[0] = "auth"; // plugin add-on command names
this.addToHelp[0] = "auth     : Auth plugin command"; // help command add-on (adds this string to the help command)
this.command[0] = require('./command.js'); // extra command location

// [Extra Gamemodes]
this.gamemodeId[0] = ''; // gamemodeids of extra plugin gamemodes
this.gamemode[0] = ''; // gamemode location

// [Configs]
this.config = {
requirelogin: 0,
plugin: 1,
allowregister: 1,
recordint: 100,
reservename: 0,
}
this.configfile = 'config.ini'


// [Functions]
this.init = function (gameServer, config) {
  this.config = config;
  auth.init(this, gameServer);
  gameServer.beforespawn = function(player) {
    
   return auth.beforespawn(player,gameServer);
  };
  gameServer.beforeq = function(player) {
    return auth.beforeq(player, gameServer);
    
  };
  gameServer.beforeeject = function(player) {return auth.beforeeject(player,gameServer);};
  gameServer.beforesplit = function(player) {return auth.beforesplit(player,gameServer);};
  gameServer.account = JSON.parse(fs.readFileSync('accounts.json'));
  gameServer.auon = this.config.plugin;
  console.log("[Auth] Auth loaded. Accounts located in accounts.json")
  // init, Used to do stuff such as overriding things


};

this.onSecond = function (gameServer) {
  if (gameServer.auon == 1) {
if (!this.up) this.up = 0;
if (this.up < this.config.recordint) {
  this.up ++;
  
} else {
  this.up = 0;
  fs.writeFileSync('accounts.json',JSON.stringify(gameServer.account, null, 2));
}
}

  // called every second
};


module.exports = this; // dont touch
{'fraction_non_alphanumeric': 0.15858823529411764, 'fraction_numerical': 0.010823529411764706, 'mean_word_length': 3.886206896551724, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '310579', 'n_tokens_mistral': 1444, 'n_tokens_neox': 1405, 'n_words': 343}