mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'coffee-compiler/prevent_empty_server_list_entries' into 'master'
Prevent empty server list entries See merge request veloren/veloren!4544
This commit is contained in:
commit
b78749e01b
@ -378,7 +378,8 @@ impl PlayState for MainMenuState {
|
||||
let validate_tls = net_settings.validate_tls;
|
||||
net_settings.username.clone_from(&username);
|
||||
net_settings.default_server.clone_from(&server_address);
|
||||
if !net_settings.servers.contains(&server_address) {
|
||||
if !server_address.is_empty() && !net_settings.servers.contains(&server_address)
|
||||
{
|
||||
net_settings.servers.push(server_address.clone());
|
||||
}
|
||||
global_state
|
||||
|
@ -534,7 +534,7 @@ impl Controls {
|
||||
events.push(Event::LoginAttempt {
|
||||
username: self.login_info.username.trim().to_string(),
|
||||
password: self.login_info.password.clone(),
|
||||
server_address: self.login_info.server.clone(),
|
||||
server_address: self.login_info.server.trim().to_string(),
|
||||
});
|
||||
},
|
||||
Message::UnlockServerField => self.server_field_locked = false,
|
||||
|
Loading…
Reference in New Issue
Block a user