Added spawning gameCommand logic

This commit is contained in:
Logsol 2013-01-05 08:19:49 +01:00
parent 371592f167
commit fb5de522e5
8 changed files with 84 additions and 59 deletions

View file

@ -38,10 +38,10 @@
Channel.prototype.onAddUser = function (userId) {
var user = new User(userId, this);
var others = Object.keys(this.users);
var othersJoined = Object.keys(this.users);
this.users[user.id] = user;
NotificationCenter.trigger('user/' + user.id + "/joinSuccess", {userId: user.id, channelName: this.name, others: others});
NotificationCenter.trigger('user/' + user.id + "/joinSuccess", {userId: user.id, channelName: this.name, others: othersJoined});
NotificationCenter.trigger('user/joined', user);
}