From 7039b17bf6e00735b5698e149c5cbce0df729e2b Mon Sep 17 00:00:00 2001 From: qwint Date: Sun, 21 Jul 2024 18:12:11 -0500 Subject: [PATCH] CommonClient: fix bug when using Connect button without a disconnect (#3609) * makes the kivy connect button do the same username forgetting that /connect does to fix an issue where losing connection would make you unable to connect to a different server * extract duplicate code --- kvui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kvui.py b/kvui.py index 1409e2dc..a63d6369 100644 --- a/kvui.py +++ b/kvui.py @@ -595,8 +595,8 @@ class GameManager(App): "!help for server commands.") def connect_button_action(self, button): + self.ctx.username = None if self.ctx.server: - self.ctx.username = None async_start(self.ctx.disconnect()) else: async_start(self.ctx.connect(self.server_connect_bar.text.replace("/connect ", "")))