diff options
| author | Jules Laplace <jules@okfoc.us> | 2013-02-23 11:46:30 -0800 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2013-02-23 11:46:30 -0800 |
| commit | b972385a838e0f54755d8e9a59bcf6ca5aeee463 (patch) | |
| tree | 2f02ea5f58aa984c896ec1092c981aa837706a50 /public/js/game.js | |
| parent | 1cf3491f7ff8fc03dc1db12452075ad1daaad775 (diff) | |
logging In
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]); |
