log in console, npm run rmlog

This commit is contained in:
Flummi 2017-11-19 23:08:19 +01:00
parent 7438a77236
commit b83cd626c3
3 changed files with 7 additions and 3 deletions

View File

@ -7,7 +7,8 @@
"build": "./node_modules/.bin/babel src --presets=env --plugins=add-module-exports --out-dir dist",
"debug": "node --inspect=9229 dist/bot.js",
"start": "npm run build && node dist/bot.js",
"inspect": "npm run build && node --inspect=9229 dist/bot.js"
"inspect": "npm run build && node --inspect=9229 dist/bot.js",
"rmlog": "rm logs/*.log"
},
"author": "Flummi & jkhsjdhjs",
"license": "WTFPL",

View File

@ -244,7 +244,7 @@ module.exports = irc;
util.inherits(irc, EventEmitter);
function parsePrefix(prefix) {
let usertmp = prefix.split("!");
let usertmp = prefix.replace(/^:/, "").split("!");
let hosttmp = usertmp[1].split("@");
return {
nick: usertmp[0],

View File

@ -9,9 +9,12 @@ const logger = new (winston.Logger)({
}),
new (winston.transports.File)({
name: "info-file",
filename: `${__dirname}/../../logs/${~~(Date.now() / 1000)}.log`,
filename: `${__dirname}/../../logs/${~~(Date.now() / 1000)}_info.log`,
level: "info"
}),
new (winston.transports.Console)({
level: "info"
})
]
});