From ef07c3d832bcb380ced61432b8b570668a6ec9c8 Mon Sep 17 00:00:00 2001 From: Fulgen301 Date: Sun, 26 Nov 2017 11:07:30 +0100 Subject: Fix scenario hosting --- pycrctrl.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pycrctrl.py') diff --git a/pycrctrl.py b/pycrctrl.py index 0c2017d..2a7ea89 100755 --- a/pycrctrl.py +++ b/pycrctrl.py @@ -213,10 +213,10 @@ class PyCRCtrl(object): raise OSError("No path specified") with open(os.path.join(self.path,"scenarios.lst"), "r") as fobj: - self.scenlist = fobj.readlines() + self.scenlist = [i.strip() for i in fobj.readlines()] with open(os.path.join(self.path, "scenarios_league.lst"), "r") as fobj: - self.league_scenlist = fobj.readlines() + self.league_scenlist = [i.strip() for i in fobj.readlines()] print("DEBUG: Scenario lists loaded.") @@ -546,6 +546,7 @@ def host(args): elif scenario not in server.scenlist: reply(f"Szenario {scenario} nicht gefunden!") + return if not server.server_thread: server.scenario = scenario -- cgit v1.2.3-54-g00ecf