Skip to content

Commit

Permalink
CommonClient: fix bug when using Connect button without a disconnect (#…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
qwint authored Jul 21, 2024
1 parent 34e7748 commit 7039b17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kvui.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,8 +595,8 @@ 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:
async_start(self.ctx.connect(self.server_connect_bar.text.replace("/connect ", "")))
Expand Down

0 comments on commit 7039b17

Please sign in to comment.