Auth system

This commit is contained in:
MrFry 2020-04-03 08:54:48 +02:00
parent 52778532dc
commit 9435cc6533
14 changed files with 637 additions and 23 deletions

View file

@ -43,13 +43,6 @@ const statFile = 'stats/stats'
const vStatFile = 'stats/vstats'
const nologFile = './nolog'
const writeInterval = 10
let data = {}
let vData = {}
let writes = 0
let debugLevel = 0
const colors = [
'green',
'red',
@ -59,6 +52,14 @@ const colors = [
'cyan'
]
const writeInterval = 10
const debugLevel = parseInt(process.env.NS_LOGLEVEL) || 0
Log('Loglevel is: ' + debugLevel)
let data = {}
let vData = {}
let writes = 0
let noLogips = []
function GetDateString () {
@ -158,10 +159,7 @@ function setNoLogReadInterval () {
parseNoLogFile(utils.ReadFile(nologFile))
}
function Load (debugLvl) {
if (debugLvl) {
debugLevel = debugLvl
}
function Load () {
Log('Loading logger...')
try {
var prevData = utils.ReadFile(statFile)