From b1586684c866071082e72eb66252066130005f3b Mon Sep 17 00:00:00 2001 From: Manuel Knitza Date: Mon, 11 Feb 2013 03:03:18 +0100 Subject: [PATCH] Explicitly log creation of pad --- src/node/handler/PadMessageHandler.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/node/handler/PadMessageHandler.js b/src/node/handler/PadMessageHandler.js index 84a9ce6cc..7cd945af3 100644 --- a/src/node/handler/PadMessageHandler.js +++ b/src/node/handler/PadMessageHandler.js @@ -915,8 +915,14 @@ function handleClientReady(client, message) sessioninfos[client.id].readOnlyPadId = padIds.readOnlyPadId; sessioninfos[client.id].readonly = padIds.readonly; + //Log creation/(re-)entering of a pad client.get('remoteAddress', function(er, ip) { - accessLogger.info('[ENTER] Pad "'+padIds.padId+'": Client '+client.id+' with IP "'+ip+'" entered the pad') + if(pad.head > 0) { + accessLogger.info('[ENTER] Pad "'+padIds.padId+'": Client '+client.id+' with IP "'+ip+'" entered the pad'); + } + else if(pad.head == 0) { + accessLogger.info('[CREATE] Pad "'+padIds.padId+'": Client '+client.id+' with IP "'+ip+'" created the pad'); + } }) //If this is a reconnect, we don't have to send the client the ClientVars again