gameCommand implementation

This commit is contained in:
Logsol 2013-01-04 03:02:05 +01:00
parent 6219a82fbd
commit c4c48ab821
10 changed files with 62 additions and 39 deletions

View file

@ -35,6 +35,15 @@ function (NotificationCenter, childProcess) {
this.channelPipe.send(message);
}
PipeToChannel.prototype.sendToUser = function (id, data) {
var message = {
recipient: "user/" + id,
data: data
}
this.channelPipe.send(message);
}
PipeToChannel.prototype.onMessage = function (message) {
NotificationCenter.trigger(message.recipient + '/message', message.data);
}