mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fixed issue with errorounououoesess coll on linje 106 in chat
This commit is contained in:
@@ -103,7 +103,7 @@ var generate_name = function(guid, announce_payload) {
|
||||
} else if(announce_payload.message && !announce_payload.all) {
|
||||
io.to(announce_payload.channel).emit('chat', {from: name, msg: ": " + announce_payload.message});
|
||||
} else if(announce_payload.message && announce_payload.all) {
|
||||
io.sockets.emit('chat.all', {from: name, msg: ": " + announce_payload.message, channel: coll});
|
||||
io.sockets.emit('chat.all', {from: name, msg: ": " + announce_payload.message, channel: announce_payload.channel});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
@@ -318,36 +318,26 @@ module.exports = function() {
|
||||
|
||||
socket.on('disconnect', function()
|
||||
{
|
||||
console.log("disconnect");
|
||||
clearTimeout(ping_timeout);
|
||||
List.left_channel(coll, guid, short_id, in_list, socket, false);
|
||||
});
|
||||
|
||||
socket.on('disconnected', function()
|
||||
{
|
||||
console.log("disconnected");
|
||||
clearTimeout(ping_timeout);
|
||||
List.left_channel(coll, guid, short_id, in_list, socket, false);
|
||||
});
|
||||
|
||||
socket.on('reconnect_failed', function()
|
||||
{
|
||||
console.log("reconnect_failed");
|
||||
clearTimeout(ping_timeout);
|
||||
List.left_channel(coll, guid, short_id, in_list, socket, false);
|
||||
});
|
||||
|
||||
socket.on('connect_timeout', function()
|
||||
{
|
||||
console.log("connect_timeout");
|
||||
clearTimeout(ping_timeout);
|
||||
List.left_channel(coll, guid, short_id, in_list, socket, false);
|
||||
});
|
||||
|
||||
socket.on('error', function()
|
||||
{
|
||||
console.log("error");
|
||||
clearTimeout(ping_timeout);
|
||||
List.left_channel(coll, guid, short_id, in_list, socket, false);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user