added joints

This commit is contained in:
jeena 2013-12-28 02:39:32 +01:00
parent fa110ff4a8
commit 764220675b
10 changed files with 111 additions and 24 deletions

View file

@ -23,7 +23,7 @@ function(Parent, NotificationCenter, Parser) {
} else {
message = options;
}
for (var command in message) {
this[command].call(this, message[command]);
}

View file

@ -16,22 +16,15 @@ function (NotificationCenter, Channel) {
process.on('message', function (message, handle) {
for(var method in message.data) {
switch(method) {
case 'CREATE':
self.channel = new Channel(this, message.data[method]);
break;
case 'KILL':
self.channel.destroy();
process.exit(0);
break;
default:
self.onMessage(message);
break;
}
if(message.data.hasOwnProperty('CREATE')) {
self.channel = new Channel(this, message.data['CREATE']);
} else if (message.data.hasOwnProperty('KILL')) {
self.channel.destroy();
process.exit(0);
} else {
self.onMessage(message);
}
});
}