Removed old motd handling

This commit is contained in:
YourFriendlyNeighborhoodDealer 2019-02-24 10:50:38 +01:00
parent b8c1a6ca97
commit 8cc7776f09
3 changed files with 2 additions and 14 deletions

View file

@ -30,7 +30,6 @@ var recievedFile = "stats/recieved";
var staticFile = "public/data/static";
var manFile = "public/man.html";
var dataFile = "public/data.json";
var motdFile = "public/motd";
var versionFile = "public/currVersion";
const qaFile = "public/qa";
@ -281,9 +280,7 @@ function ProcessIncomingRequest(data) {
data.AddQuestion(d.subj, q);
}
var motd = utils.ReadFile(motdFile);
var version = utils.ReadFile(versionFile);
data.motd = motd;
data.version = version;
logger.Log("[PCES]:\t" + d.subj);
var msg = "All / new count: " + allQuestions.length + " / " + questions.length;

View file

@ -1,8 +0,0 @@
How does this work?
first line is always answer.
every new line is displayed as new line
#
Is this a new question?
yes.
dont put # after the last qa!

View file

@ -36,7 +36,6 @@ const stat = require('./stat.js');
const recivedFiles = "public/recivedfiles";
const uloadFiles = "public/f";
const motdFile = "public/motd";
const staticFile = "public/data/static";
const dataFile = "public/data.json";
const countFile = "public/data/count";
@ -121,14 +120,14 @@ app.get('/manual', function(req, res) {
});
app.get('/public', function(req, res) {
var response = '@' + utils.ReadFile(motdFile);
var response = '@Plz update :)';
response += utils.ReadFile(staticFile);
res.write(response);
res.end();
});
app.get('/static', function(req, res) {
var response = '@' + utils.ReadFile(motdFile);
var response = '@Plz update :)';
response += utils.ReadFile(staticFile);
res.write(response);
res.end();