Log users out at start of the bot

Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
This commit is contained in:
Ari Archer 2022-07-22 13:22:08 +03:00
parent 3f8b3b61e5
commit a13efe7a4e
Signed by untrusted user who does not match committer: ari
GPG key ID: A50D5B4B599AF8A2

View file

@ -77,7 +77,7 @@ def gen_key() -> str:
GUAC_CACHE: Dict[str, Dict[Any, Any]] = {"guac": {}, "unguac": {}}
AUTH: Dict[str, Any] = {"users": set(), "key": gen_key()}
AUTH: Dict[str, Any] = {"users": set(), "key": ""}
STATE: Dict[str, Any] = {"run": True, "vm": "", "chatlog": []}
VOTE_STATES: Dict[int, str] = {
0: "Vote started",
@ -905,7 +905,8 @@ async def main() -> int:
if CONFIG["init-message"].strip():
await ws.send_str(guac_msg("chat", CONFIG["init-message"]))
log(f"Auth key: {AUTH['key']}")
reset_authkey()
AUTH["users"].clear()
async for msg in ws:
parsed_msg: Optional[List[str]] = unguac_msg(msg.data)