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
This commit is contained in:
parent
34e7748f23
commit
7039b17bf6
2
kvui.py
2
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 ", "")))
|
||||
|
|
Loading…
Reference in New Issue