From fad0798fc0212ad2b4b93443f7c8de970f3d760d Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Sun, 21 Feb 2016 12:24:43 +0100 Subject: [PATCH] Client: Fix bugs in plugin infrastructure. --- client/window_management.py | 2 ++ roguelike-client | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/client/window_management.py b/client/window_management.py index 9a50b29..610764b 100644 --- a/client/window_management.py +++ b/client/window_management.py @@ -95,6 +95,8 @@ def set_windows(): curses.endwin() stdscr = curses.initscr() screen_size = stdscr.getmaxyx() + global windows + windows = [] for config in windows_config: size = size_window(config["config"]) window = Window(config["title"], config["func"], size) diff --git a/roguelike-client b/roguelike-client index ed0ab74..4514946 100755 --- a/roguelike-client +++ b/roguelike-client @@ -89,7 +89,7 @@ def read_message_queue(): redraw_windows = True elif message == "WORLD_UPDATED": query_mapcell() - elif message == "PLUGIN": + elif message[:6] == "PLUGIN": str_plugin = message[7:] if (str_plugin.replace("_", "").isalnum() and os.access("plugins/client/" + str_plugin + ".py", -- 2.30.2