From 512df0ca6b0cf18d154d085f656db44c1ec426a6 Mon Sep 17 00:00:00 2001 From: "Cathy J. Fitzpatrick" Date: Mon, 20 May 2013 06:33:11 -0500 Subject: [PATCH 1/2] Support the `nameTaken` JSON event --- js/client.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/client.js b/js/client.js index b2f81ab15..24835307b 100644 --- a/js/client.js +++ b/js/client.js @@ -582,7 +582,11 @@ } }, disconnect: function () {}, - nameTaken: function (data) {}, + nameTaken: function (data) { + // Legacy -- but still how the server communicates that a + // name is taken, so we need to support it for now. + app.addPopup(LoginPopup, {reason: data.reason || ''}); + }, command: function (message) { // Legacy self.trigger('response:'+message.command, message); From 3937ff775fff882c8e93b0b5f139cac4c4ffc0d4 Mon Sep 17 00:00:00 2001 From: "Cathy J. Fitzpatrick" Date: Mon, 20 May 2013 06:33:48 -0500 Subject: [PATCH 2/2] Delete the handler for the `disconnect` JSON event Nothing in the server actually emits the `disconnect` event, so the client does not need to handle it. --- js/client.js | 1 - 1 file changed, 1 deletion(-) diff --git a/js/client.js b/js/client.js index 24835307b..8827fded4 100644 --- a/js/client.js +++ b/js/client.js @@ -581,7 +581,6 @@ self.receive(message.message); } }, - disconnect: function () {}, nameTaken: function (data) { // Legacy -- but still how the server communicates that a // name is taken, so we need to support it for now.