|
|
|
@ -73,9 +73,21 @@ impl Game {
|
|
|
|
|
send_queue.push(token, "\n\nUsername: ", false, None);
|
|
|
|
|
client.state = State::Login(Login::Username);
|
|
|
|
|
} else {
|
|
|
|
|
send_queue.push(token, "\nNew password again: ", false, None);
|
|
|
|
|
client.state =
|
|
|
|
|
State::Login(Login::CreatePassword2((username.to_owned(), message)));
|
|
|
|
|
match self.check_player_password(message) {
|
|
|
|
|
PlayerCheck::Ok(pass) => {
|
|
|
|
|
send_queue.push(token, "\nNew password again: ", false, None);
|
|
|
|
|
client.state =
|
|
|
|
|
State::Login(Login::CreatePassword2((username.to_owned(), pass)));
|
|
|
|
|
},
|
|
|
|
|
PlayerCheck::Err(err) => {
|
|
|
|
|
send_queue.push(token, "\nInvalid password:\n", false, None);
|
|
|
|
|
for line in err {
|
|
|
|
|
send_queue.push(token, format!("{}\n", line), false, None);
|
|
|
|
|
}
|
|
|
|
|
send_queue.push(token, "\nNew password: ", false, None);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|