Fixed getting "left" message on isolate-rooms
This commit is contained in:
parent
706ca6fea4
commit
4196ba1ec2
@ -138,15 +138,16 @@ class SyncFactory(Factory):
|
|||||||
self.broadcastRoom(watcher.watcherProtocol, l)
|
self.broadcastRoom(watcher.watcherProtocol, l)
|
||||||
|
|
||||||
def removeWatcher(self, watcherProtocol):
|
def removeWatcher(self, watcherProtocol):
|
||||||
watcher = self._removeWatcherFromTheRoom(watcherProtocol)
|
watcher = self.getWatcher(watcherProtocol)
|
||||||
if(not watcher):
|
if(not watcher):
|
||||||
return
|
return
|
||||||
watcher.deactivate()
|
|
||||||
print "{0} left server".format(watcher.name)
|
|
||||||
self._deleteRoomIfEmpty(watcher.room)
|
|
||||||
l = lambda w: w.sendUserSetting(watcher.name, watcher.room, None, {"left": True})
|
l = lambda w: w.sendUserSetting(watcher.name, watcher.room, None, {"left": True})
|
||||||
self.broadcast(watcherProtocol, l)
|
self.broadcast(watcherProtocol, l)
|
||||||
|
self._removeWatcherFromTheRoom(watcherProtocol)
|
||||||
|
watcher.deactivate()
|
||||||
|
self._deleteRoomIfEmpty(watcher.room)
|
||||||
|
print "{0} left server".format(watcher.name)
|
||||||
|
|
||||||
def watcherGetUsername(self, watcherProtocol):
|
def watcherGetUsername(self, watcherProtocol):
|
||||||
return self.getWatcher(watcherProtocol).name
|
return self.getWatcher(watcherProtocol).name
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user