mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Added some colors
This commit is contained in:
parent
d6edfa15e1
commit
e55c7beb37
3 changed files with 15 additions and 5 deletions
14
actions.js
14
actions.js
|
@ -44,12 +44,12 @@ function Process(d, file) {
|
|||
var oldRes = CheckData(oldFile);
|
||||
|
||||
if (newRes.count > 0)
|
||||
logger.Log("[NLOD]: new file result: " + newRes.count);
|
||||
logger.Log("[NLOD]: new file result: " + newRes.count, logger.GetColor("blue"));
|
||||
else
|
||||
logger.Log("[NLOD]: new file NLOD error, " + newRes.log, logger.GetColor("redbg"), true);
|
||||
|
||||
if (oldRes.count > 0)
|
||||
logger.Log("[NLOD]: old public result: " + oldRes.count);
|
||||
logger.Log("[NLOD]: old public result: " + oldRes.count, logger.GetColor("blue"));
|
||||
else
|
||||
logger.Log("[NLOD]: old public NLOD error, " + oldRes.log, logger.GetColor("redbg"), true);
|
||||
|
||||
|
@ -60,11 +60,13 @@ function Process(d, file) {
|
|||
} else
|
||||
logger.Log("[PCES]: No new data.");
|
||||
|
||||
|
||||
} catch (e) {
|
||||
Beep();
|
||||
logger.Log("[ERR ]: Error at processing data! File: " + file, logger.GetColor("redbg"));
|
||||
logger.Log(e.toString(), logger.GetColor("redbg"));
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
function ProcessIncomingRequest(data) {
|
||||
|
@ -93,6 +95,14 @@ function ProcessIncomingRequest(data) {
|
|||
Process(d, publicFile);
|
||||
Process(d, staticFile);
|
||||
}*/
|
||||
try {
|
||||
var splitted = d.alldata.split("\n");
|
||||
var count = 0;
|
||||
for (var i = 0; i < splitted.length; i++)
|
||||
if (splitted[i][0] == '?')
|
||||
count ++;
|
||||
logger.Log("[PCES]: Test all question count: " + count, logger.GetColor("blue"));
|
||||
} catch (e) {console.log("Error :c"); console.log(e);}
|
||||
var newPubItems = Process(d, publicFile);
|
||||
var newStatItems = Process(d, staticFile);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue