Updated room command
room cmd now defaults to filename server now allows more characters in room names
This commit is contained in:
parent
82f01447e2
commit
2dbd814fa4
@ -129,7 +129,7 @@ class SyncServerProtocol(CommandProtocol):
|
||||
def room(self, args):
|
||||
watcher = self.factory.watchers.get(self.__protocol)
|
||||
old_room = watcher.room
|
||||
watcher.room = str(re.sub('[^\w]','',args[0]))
|
||||
watcher.room = str(args[0].encode('ascii','replace'))
|
||||
self.factory.broadcast(watcher, lambda receiver: receiver.watcher_proto.sender.send_room(watcher.name,watcher.room))
|
||||
if not watcher.room in self.factory.paused:
|
||||
self.factory.paused[watcher.room] = True
|
||||
|
||||
@ -72,7 +72,7 @@ class ConsoleUI(threading.Thread):
|
||||
elif matched_room:
|
||||
room = matched_room.group(2)
|
||||
if room == None:
|
||||
room = 'default'
|
||||
room = self._syncplayClient.users.currentUser.filename
|
||||
self._syncplayClient.users.currentUser.room = room
|
||||
self._syncplayClient.checkIfFileMatchesOthers()
|
||||
self._syncplayClient.protocol.sender.send_room(room)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user