mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
fixed #53
This commit is contained in:
parent
695008afd8
commit
aa4535cb0c
10 changed files with 73 additions and 32 deletions
|
|
@ -104,11 +104,17 @@
|
|||
}
|
||||
|
||||
Channel.prototype.broadcastGameCommand = function (command, options) {
|
||||
this.broadcastControlCommand("gameCommand", ProtocolHelper.encodeCommand(command, options));
|
||||
for(var id in this.users) {
|
||||
this.users[id].sendGameCommand(command, options);
|
||||
}
|
||||
}
|
||||
|
||||
Channel.prototype.broadcastGameCommandExcept = function (command, options, exceptUser) {
|
||||
this.broadcastControlCommandExcept("gameCommand", ProtocolHelper.encodeCommand(command, options), exceptUser);
|
||||
for(var id in this.users) {
|
||||
if (id != exceptUser.id) {
|
||||
this.users[id].sendGameCommand(command, options);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Channel;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue