Add additional logging.

This commit is contained in:
Pentarctagon 2022-02-07 09:38:44 -06:00
parent bb0206d1bf
commit c4a7fce80a
No known key found for this signature in database
GPG key ID: 9456BC54A21DBFA0

View file

@ -1690,10 +1690,13 @@ void server::handle_player_in_game(player_iterator p, simple_wml::document& data
for(const auto& content : addon->children("content")) {
unsigned long long rows_inserted = user_handler_->db_insert_game_content_info(uuid_, g.db_id(), content->attr("type").to_string(), content->attr("name").to_string(), content->attr("id").to_string(), addon->attr("id").to_string(), addon->attr("version").to_string());
if(rows_inserted == 0) {
WRN_SERVER << "Did not insert content row for [addon] data with uuid '" << uuid_ <<"', game ID '" << g.db_id() << "', type '" << content->attr("type").to_string() << "', and content ID '" << content->attr("id").to_string() << "'\n";
WRN_SERVER << "Did not insert content row for [addon] data with uuid '" << uuid_ << "', game ID '" << g.db_id() << "', type '" << content->attr("type").to_string() << "', and content ID '" << content->attr("id").to_string() << "'\n";
}
}
}
if(m.children("addon").size() == 0) {
WRN_SERVER << "Game content info missing for game with uuid '" << uuid_ << "', game ID '" << g.db_id() << "', named '" << g.name() << "'\n";
}
user_handler_->db_insert_game_info(uuid_, g.db_id(), server_id_, g.name(), g.is_reload(), m["observer"].to_bool(), !m["private_replay"].to_bool(), g.has_password());