Autogen chandump and chanlogs folders

This commit is contained in:
calzoneman 2013-03-31 13:31:56 -05:00
parent 6ba6db1965
commit 954751ec6c
1 changed files with 18 additions and 0 deletions

View File

@ -22,6 +22,24 @@ Database.init();
exports.channels = {};
fs.exists("chandump", function(exists) {
if(!exists) {
fs.mkdir("chandump", function(err) {
if(err)
Logger.errlog.log(err);
});
}
});
fs.exists("chanlogs", function(exists) {
if(!exists) {
fs.mkdir("chanlogs", function(err) {
if(err)
Logger.errlog.log(err);
});
}
});
exports.io.sockets.on("connection", function(socket) {
var user = new User(socket, socket.handshake.address.address);
Logger.syslog.log("Accepted connection from /" + user.ip);