diff options
Diffstat (limited to 'public/js/game.js')
| -rw-r--r-- | public/js/game.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/public/js/game.js b/public/js/game.js index 3b0a71b..af05ad9 100644 --- a/public/js/game.js +++ b/public/js/game.js @@ -1,13 +1,14 @@ var socket = io.connect(window.location.hostname); var Game = { - nick: "ryz", + nick: null, init: function(){ // Bind events from the server socket.on('event-join', Events.receive.join); socket.on('event-message', Events.receive.message); + Auth.init(); Chat.init(); } } @@ -15,6 +16,7 @@ var Game = { var Events = { receive: { + join: function(data){ for (var i in data.messages) { Chat.add(data.messages[i]); |
