From 8074074fae5a0e8e4eca6761db2a8dbdb5712991 Mon Sep 17 00:00:00 2001 From: qwint Date: Wed, 3 Jul 2024 23:00:49 -0500 Subject: [PATCH] extract duplicate code --- kvui.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kvui.py b/kvui.py index 6914a67ba5bf..7b32f6cfd24e 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):