mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
Added spawning gameCommand logic
This commit is contained in:
parent
371592f167
commit
fb5de522e5
8 changed files with 84 additions and 59 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue