fixed client removal, joining, etc.

This commit is contained in:
Logsol 2013-01-03 23:05:27 +01:00
parent 2183e70bd8
commit 69fd43a900
6 changed files with 69 additions and 50 deletions

View file

@ -53,7 +53,7 @@ function (User, Channel, PipeToChannel, NotificationCenter) {
Coordinator.prototype.removeUser = function (user) {
//user.channel.send('user/' + user.id + '/left');
NotificationCenter.trigger('user/left', user);
//NotificationCenter.off('channel/' + user.channel.channelName + '/user/' + user.id);
delete this.lobbyUsers[user.id];
@ -82,7 +82,7 @@ function (User, Channel, PipeToChannel, NotificationCenter) {
}, this);
NotificationCenter.on('user/left', function (user) {
channelPipe.send('channel', { releaseUser: user.id });
}, this);
return channelPipe;