From ede32726c186f3bd937801ccf313886248fac622 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Bartelme=C3=9F?= Date: Wed, 14 Mar 2012 01:32:16 +0100 Subject: check if sockets are available in PadMessageHandler --- src/node/handler/PadMessageHandler.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/node') diff --git a/src/node/handler/PadMessageHandler.js b/src/node/handler/PadMessageHandler.js index e26bb46e..26748517 100644 --- a/src/node/handler/PadMessageHandler.js +++ b/src/node/handler/PadMessageHandler.js @@ -128,7 +128,11 @@ exports.handleDisconnect = function(client) //Go trough all user that are still on the pad, and send them the USER_LEAVE message for(i in pad2sessions[sessionPad]) { - socketio.sockets.sockets[pad2sessions[sessionPad][i]].json.send(messageToTheOtherUsers); + var socket = socketio.sockets.sockets[pad2sessions[sessionPad][i]]; + if(socket !== undefined){ + socket.json.send(messageToTheOtherUsers); + } + } }); } @@ -738,9 +742,10 @@ function handleClientReady(client, message) { for(var i in pad2sessions[message.padId]) { - if(sessioninfos[pad2sessions[message.padId][i]].author == author) + if(sessioninfos[pad2sessions[message.padId][i]] && sessioninfos[pad2sessions[message.padId][i]].author == author) { - socketio.sockets.sockets[pad2sessions[message.padId][i]].json.send({disconnect:"userdup"}); + var socket = socketio.sockets.sockets[pad2sessions[message.padId][i]]; + if(socket) socket.json.send({disconnect:"userdup"}); } } } -- cgit v1.2.3 From 1cf3ffef4a1593417893a5b24be84c244ca060d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Bartelme=C3=9F?= Date: Wed, 14 Mar 2012 01:41:05 +0100 Subject: added jQuery to ace2_inner, make it embeddable, ace hooks work now propertly in ace2_inner --- src/node/utils/tar.json | 1 + 1 file changed, 1 insertion(+) (limited to 'src/node') diff --git a/src/node/utils/tar.json b/src/node/utils/tar.json index a905eb44..895c2d9a 100644 --- a/src/node/utils/tar.json +++ b/src/node/utils/tar.json @@ -51,6 +51,7 @@ ] , "ace2_inner.js": [ "ace2_common.js" + , "rjquery.js" , "AttributePoolFactory.js" , "Changeset.js" , "security.js" -- cgit v1.2.3 From cf1be9b4bf8ac0e27971837ebc96f3c388ce19cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Bartelme=C3=9F?= Date: Fri, 23 Mar 2012 20:22:49 +0100 Subject: added underscore to tar.json --- src/node/utils/tar.json | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/node') diff --git a/src/node/utils/tar.json b/src/node/utils/tar.json index 895c2d9a..adb6e2b2 100644 --- a/src/node/utils/tar.json +++ b/src/node/utils/tar.json @@ -1,6 +1,7 @@ { "pad.js": [ "jquery.js" + , "underscore.js" , "security.js" , "pad.js" , "ace2_common.js" @@ -25,6 +26,7 @@ ] , "timeslider.js": [ "jquery.js" + , "underscore.js" , "security.js" , "undo-xpopup.js" , "json2.js" @@ -51,6 +53,7 @@ ] , "ace2_inner.js": [ "ace2_common.js" + , "underscore.js" , "rjquery.js" , "AttributePoolFactory.js" , "Changeset.js" -- cgit v1.2.3