mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Server stat fixes
This commit is contained in:
parent
c1197533c7
commit
194b05b13e
1 changed files with 8 additions and 4 deletions
|
@ -28,6 +28,8 @@ const coloredWords = {
|
||||||
'allqr',
|
'allqr',
|
||||||
'possibleAnswers',
|
'possibleAnswers',
|
||||||
'irc',
|
'irc',
|
||||||
|
'faq',
|
||||||
|
'/script'
|
||||||
],
|
],
|
||||||
blue: ['isadding', 'ask'],
|
blue: ['isadding', 'ask'],
|
||||||
magenta: [
|
magenta: [
|
||||||
|
@ -158,7 +160,9 @@ function countLinesMatching(text, toMatch) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function readFile(name) {
|
function readFile(name) {
|
||||||
return fs.readFileSync(name, 'utf8')
|
if (fs.existsSync(name)) {
|
||||||
|
return fs.readFileSync(name, 'utf8')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getLetterNTimes(letter, number) {
|
function getLetterNTimes(letter, number) {
|
||||||
|
@ -379,9 +383,9 @@ function printLastDataCount(data) {
|
||||||
}
|
}
|
||||||
// ------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------
|
||||||
printHeader('Daily script install / update check count')
|
printHeader('Daily script install / update check count')
|
||||||
const todaysLogs = readFile(`${dir}stats/vlogs/${getDayIndex()}`)
|
const todaysLogs = readFile(`${dir}stats/vlogs/log`)
|
||||||
const yesterdaysLogs = readFile(`${dir}stats/vlogs/${getDayIndex(-1)}`)
|
const yesterdaysLogs = readFile(`${dir}stats/vlogs/${getDayIndex(-1)}`) || ''
|
||||||
const beforeYesterdaysLogs = readFile(`${dir}stats/vlogs/${getDayIndex(-2)}`)
|
const beforeYesterdaysLogs = readFile(`${dir}stats/vlogs/${getDayIndex(-2)}`) || ''
|
||||||
|
|
||||||
const installs = [
|
const installs = [
|
||||||
[
|
[
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue