(self, watcher, password, roomBaseName=None)
| 196 | return self._roomManager.getEmptyPersistentRooms() |
| 197 | |
| 198 | def authRoomController(self, watcher, password, roomBaseName=None): |
| 199 | room = watcher.getRoom() |
| 200 | roomName = roomBaseName if roomBaseName else room.getName() |
| 201 | try: |
| 202 | success = RoomPasswordProvider.check(roomName, password, self._salt) |
| 203 | if success: |
| 204 | watcher.getRoom().addController(watcher) |
| 205 | self._roomManager.broadcast(watcher, lambda w: w.sendControlledRoomAuthStatus(success, watcher.getName(), room._name)) |
| 206 | except NotControlledRoom: |
| 207 | newName = RoomPasswordProvider.getControlledRoomName(roomName, password, self._salt) |
| 208 | watcher.sendNewControlledRoom(newName, password) |
| 209 | except ValueError: |
| 210 | self._roomManager.broadcastRoom(watcher, lambda w: w.sendControlledRoomAuthStatus(False, watcher.getName(), room._name)) |
| 211 | |
| 212 | def sendChat(self, watcher, message): |
| 213 | message = truncateText(message, self.maxChatMessageLength) |
no test coverage detected