From eb03f3356683c6f3069f2f7b08b3935ca3314559 Mon Sep 17 00:00:00 2001 From: qwint Date: Tue, 2 Jul 2024 21:13:33 -0500 Subject: [PATCH 1/2] 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 --- kvui.py | 1 + 1 file changed, 1 insertion(+) diff --git a/kvui.py b/kvui.py index 500203a8818..6914a67ba5b 100644 --- a/kvui.py +++ b/kvui.py @@ -599,6 +599,7 @@ def connect_button_action(self, button): self.ctx.username = None async_start(self.ctx.disconnect()) else: + self.ctx.username = None async_start(self.ctx.connect(self.server_connect_bar.text.replace("/connect ", ""))) def on_stop(self): From 8074074fae5a0e8e4eca6761db2a8dbdb5712991 Mon Sep 17 00:00:00 2001 From: qwint Date: Wed, 3 Jul 2024 23:00:49 -0500 Subject: [PATCH 2/2] extract duplicate code --- kvui.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kvui.py b/kvui.py index 6914a67ba5b..7b32f6cfd24 100644 --- a/kvui.py +++ b/kvui.py @@ -595,11 +595,10 @@ def command_button_action(self, button): "!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: - self.ctx.username = None async_start(self.ctx.connect(self.server_connect_bar.text.replace("/connect ", ""))) def on_stop(self):