Fixed MP admins being unable to observe private games (fixes #2851)
This was due to the change in the MP initialization process wherein the lobby wouldn't show up until the initial gamelist was received. Since the admin auth message is sent after [join_game] and before the initial gamelist, and the chatbox widget handled parsing the auth message, the client was never marked as authenticated and therefor couldn't observe private games. This fixes that by adding auth parsing to the MP initialization process. Note this doesn't fix the issue of the auth confirmation not showing up in the lobby chat (issue #2920). I'll have to think of a way to fix that separately.
This commit is contained in:
parent
5a2d1bc992
commit
e8d55062c4
2 changed files with 7 additions and 0 deletions
|
@ -49,6 +49,7 @@
|
|||
* New attack animation for the Peasant.
|
||||
### Miscellaneous and bug fixes
|
||||
* Added an advanced preference to enable experimental PRNG combat.
|
||||
* Fixed MP admins being unable to observe private games.
|
||||
|
||||
## Version 1.14.3
|
||||
### AI
|
||||
|
|
|
@ -176,6 +176,12 @@ std::pair<wesnothd_connection_ptr, config> open_connection(std::string host)
|
|||
throw wesnothd_rejected_client_error(error_message);
|
||||
}
|
||||
|
||||
// The only message we should get here is the admin authentication message.
|
||||
// It's sent after [join_lobby] and before the initial gamelist.
|
||||
if(const config& message = data.child("message")) {
|
||||
preferences::parse_admin_authentication(message["sender"], message["message"]);
|
||||
}
|
||||
|
||||
// Continue if we did not get a direction to login
|
||||
if(!data.has_child("mustlogin")) {
|
||||
continue;
|
||||
|
|
Loading…
Add table
Reference in a new issue