fixed server bugs

This commit is contained in:
logsol 2012-07-22 15:01:50 +02:00
parent f85469b97e
commit 3afc2fa66e
5 changed files with 24 additions and 27 deletions

View file

@ -25,11 +25,11 @@ function(GameController, NotificationCenter) {
var userIds = Object.keys(this.users);
this.users[user.id] = user;
user.sendCommand('joinSuccess', {channelName: this.name, id: user.id, userIds: userIds});
this.sendCommandToAllUsersExcept('userJoined', user.id, user);
this.gameController.createPlayerForUser(user)
NotificationCenter.trigger('user/joined', user);
}
Channel.prototype.releaseUser = function(user) {