mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Merge branch 'master' of github.com:zoff-music/zoff
This commit is contained in:
@@ -103,7 +103,7 @@ var generate_name = function(guid, announce_payload) {
|
|||||||
} else if(announce_payload.message && !announce_payload.all) {
|
} else if(announce_payload.message && !announce_payload.all) {
|
||||||
io.to(announce_payload.channel).emit('chat', {from: name, msg: ": " + announce_payload.message});
|
io.to(announce_payload.channel).emit('chat', {from: name, msg: ": " + announce_payload.message});
|
||||||
} else if(announce_payload.message && announce_payload.all) {
|
} else if(announce_payload.message && announce_payload.all) {
|
||||||
io.sockets.emit('chat.all', {from: docs[0].name, msg: ": " + announce_payload.message, channel: coll});
|
io.sockets.emit('chat.all', {from: name, msg: ": " + announce_payload.message, channel: coll});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ app.get('/robots.txt', function (req, res) {
|
|||||||
app.use(function (req, res, next) {
|
app.use(function (req, res, next) {
|
||||||
var cookie = req.cookies._uI;
|
var cookie = req.cookies._uI;
|
||||||
if (cookie === undefined) {
|
if (cookie === undefined) {
|
||||||
var user_name = rndName(uniqid.time(), 15);
|
var user_name = Functions.rndName(uniqid.time(), 15);
|
||||||
res.cookie('_uI',user_name, { maxAge: 365 * 10000 * 3600000 });
|
res.cookie('_uI',user_name, { maxAge: 365 * 10000 * 3600000 });
|
||||||
}
|
}
|
||||||
next();
|
next();
|
||||||
|
|||||||
Reference in New Issue
Block a user