From fcde7725297734ddc2ac9154ed2ba5e65187e53c Mon Sep 17 00:00:00 2001 From: Uriziel Date: Mon, 15 Oct 2012 17:13:05 +0200 Subject: [PATCH] Fixed bugs in room changing --- syncplay/ui/consoleUI.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/syncplay/ui/consoleUI.py b/syncplay/ui/consoleUI.py index 9c58b5c..ef71da4 100644 --- a/syncplay/ui/consoleUI.py +++ b/syncplay/ui/consoleUI.py @@ -1,13 +1,10 @@ from __future__ import print_function import threading -import re import time import syncplay import os class ConsoleUI(threading.Thread): - RE_ROOM = re.compile("^room( (.+))?") - def __init__(self): self.promptMode = threading.Event() self.PromptResult = "" @@ -51,10 +48,9 @@ class ConsoleUI(threading.Thread): print("ERROR:\t" + message) def _executeCommand(self, data): - matched_room = self.RE_ROOM.match(data) - if matched_room: - room = matched_room.group(2) - if room == None: + if data[0:4] == "room": + room = data[5:] + if room == "": if self._syncplayClient.userlist.currentUser.file: room = self._syncplayClient.userlist.currentUser.file["name"] else: