|
|
|
@ -57,7 +57,6 @@ function isUserOnline(uid) {
|
|
|
|
websockets.isUserOnline = isUserOnline;
|
|
|
|
websockets.isUserOnline = isUserOnline;
|
|
|
|
|
|
|
|
|
|
|
|
websockets.init = function(io) {
|
|
|
|
websockets.init = function(io) {
|
|
|
|
|
|
|
|
|
|
|
|
io.sockets.on('connection', function(socket) {
|
|
|
|
io.sockets.on('connection', function(socket) {
|
|
|
|
var hs = socket.handshake,
|
|
|
|
var hs = socket.handshake,
|
|
|
|
sessionID, uid, lastPostTime = 0;
|
|
|
|
sessionID, uid, lastPostTime = 0;
|
|
|
|
@ -201,9 +200,9 @@ websockets.init = function(io) {
|
|
|
|
|
|
|
|
|
|
|
|
updateRoomBrowsingText(data.enter);
|
|
|
|
updateRoomBrowsingText(data.enter);
|
|
|
|
|
|
|
|
|
|
|
|
if (data.enter != 'admin')
|
|
|
|
if (data.enter != 'admin') {
|
|
|
|
io.sockets.in('admin').emit('api:get_all_rooms', io.sockets.manager.rooms);
|
|
|
|
io.sockets.in('admin').emit('api:get_all_rooms', io.sockets.manager.rooms);
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// BEGIN: API calls (todo: organize)
|
|
|
|
// BEGIN: API calls (todo: organize)
|
|
|
|
|