From afca68ffc4beb3a8365875d459fc2ce05784f2c0 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Thu, 24 Dec 2020 23:16:06 +0100
Subject: [PATCH] Fix invalid admin state upon re-login.

---
 rogue_chat.html      | 1 +
 rogue_chat_curses.py | 1 +
 2 files changed, 2 insertions(+)

diff --git a/rogue_chat.html b/rogue_chat.html
index 54ff72b..e7004a1 100644
--- a/rogue_chat.html
+++ b/rogue_chat.html
@@ -465,6 +465,7 @@ let server = {
         this.websocket.onopen = function(event) {
             game.thing_types = {};
             game.terrains = {};
+            tui.is_admin = false;
             server.send(['TASKS']);
             server.send(['TERRAINS']);
             server.send(['THING_TYPES']);
diff --git a/rogue_chat_curses.py b/rogue_chat_curses.py
index c4d0ddf..9d2ab3b 100755
--- a/rogue_chat_curses.py
+++ b/rogue_chat_curses.py
@@ -623,6 +623,7 @@ class TUI:
             self.disconnected = False
             self.game.thing_types = {}
             self.game.terrains = {}
+            self.is_admin = False
             time.sleep(0.1)  # give potential SSL negotation some time …
             self.socket.send('TASKS')
             self.socket.send('TERRAINS')
-- 
2.30.2