Handle require_modification as the client expects

Since 05d1e4b9ba, the client interprets require_modification="" as
defaulting to "yes". However, wesnothd was still defaulting it to
"no", causing an error message when trying to join games.

Fixes #8805 "Add-on version check prevents joining game".
This commit is contained in:
gfgtdf 2024-06-27 10:25:23 +02:00 committed by GitHub
parent a1fe293b88
commit 88113a738d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 4 deletions

View file

@ -0,0 +1,2 @@
### Miscellaneous and Bug Fixes
* Server-side fix for the "Something is wrong with the addon version check database supporting the multiplayer lobby." error (issue #8805)

View file

@ -1572,10 +1572,7 @@ void server::handle_player_in_game(player_iterator p, simple_wml::document& data
desc.child("modification")->set_attr_dup("id", m->attr("id"));
desc.child("modification")->set_attr_dup("name", m->attr("name"));
desc.child("modification")->set_attr_dup("addon_id", m->attr("addon_id"));
if(m->attr("require_modification").to_bool(false)) {
desc.child("modification")->set_attr("require_modification", "yes");
}
desc.child("modification")->set_attr_dup("require_modification", m->attr("require_modification"));
}
// Record the full scenario in g.level()