The Battle for Wesnoth  1.15.2+dev
lobby_data.cpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2009 - 2018 by Tomasz Sniatowski <kailoran@gmail.com>
3  Part of the Battle for Wesnoth Project https://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
16 
17 #include "config.hpp"
19 #include "preferences/game.hpp"
21 #include "filesystem.hpp"
22 #include "font/pango/escape.hpp"
23 #include "formatter.hpp"
24 #include "formula/string_utils.hpp"
25 #include "game_config_manager.hpp"
26 #include "gettext.hpp"
27 #include "lexical_cast.hpp"
28 #include "log.hpp"
29 #include "map/map.hpp"
30 #include "map/exception.hpp"
31 #include "terrain/type_data.hpp"
32 #include "wml_exception.hpp"
33 #include "game_version.hpp"
34 #include "mp_game_settings.hpp"
35 
36 #include <iterator>
37 
38 #include <boost/algorithm/string.hpp>
39 
40 static lg::log_domain log_config("config");
41 #define ERR_CF LOG_STREAM(err, log_config)
42 static lg::log_domain log_engine("engine");
43 #define WRN_NG LOG_STREAM(warn, log_engine)
44 
45 static lg::log_domain log_lobby("lobby");
46 #define DBG_LB LOG_STREAM(info, log_lobby)
47 #define LOG_LB LOG_STREAM(info, log_lobby)
48 #define ERR_LB LOG_STREAM(err, log_lobby)
49 
50 namespace mp {
51 
53  const std::string& user,
54  const std::string& message)
55  : timestamp(timestamp), user(user), message(message)
56 {
57 }
58 
60 {
61 }
62 
63 void chat_session::add_message(const std::time_t& timestamp,
64  const std::string& user,
65  const std::string& message)
66 {
67  history_.emplace_back(timestamp, user, message);
68 }
69 
70 
71 void chat_session::add_message(const std::string& user, const std::string& message)
72 {
73  add_message(std::time(nullptr), user, message);
74 }
75 
77 {
78  history_.clear();
79 }
80 
81 room_info::room_info(const std::string& name) : name_(name), members_(), log_()
82 {
83 }
84 
85 bool room_info::is_member(const std::string& user) const
86 {
87  return members_.find(user) != members_.end();
88 }
89 
90 void room_info::add_member(const std::string& user)
91 {
92  members_.insert(user);
93 }
94 
95 void room_info::remove_member(const std::string& user)
96 {
97  members_.erase(user);
98 }
99 
101 {
102  members_.clear();
103  for(const auto & m : data.child_range("member"))
104  {
105  members_.insert(m["name"]);
106  }
107 }
108 
110  : name(c["name"])
111  , game_id(c["game_id"])
112  , relation(ME)
113  , state(game_id == 0 ? LOBBY : GAME)
114  , registered(c["registered"].to_bool())
115  , observing(c["status"] == "observing")
116 {
117  update_relation();
118 }
119 
120 void user_info::update_state(int selected_game_id,
121  const room_info* current_room /*= nullptr*/)
122 {
123  if(game_id != 0) {
124  if(game_id == selected_game_id) {
125  state = SEL_GAME;
126  } else {
127  state = GAME;
128  }
129  } else {
130  if(current_room != nullptr && current_room->is_member(name)) {
131  state = SEL_ROOM;
132  } else {
133  state = LOBBY;
134  }
135  }
136  update_relation();
137 }
138 
140 {
141  if(name == preferences::login()) {
142  relation = ME;
143  } else if(preferences::is_ignored(name)) {
144  relation = IGNORED;
145  } else if(preferences::is_friend(name)) {
146  relation = FRIEND;
147  } else {
148  relation = NEUTRAL;
149  }
150 }
151 
152 bool user_info::operator<(const user_info& b) const
153 {
154  return relation < b.relation || (relation == b.relation && translation::icompare(name, b.name) < 0);
155 }
156 
157 namespace
158 {
159 const std::string& spaced_em_dash()
160 {
161  static const std::string res = " " + font::unicode_em_dash + " ";
162  return res;
163 }
164 
165 std::string make_game_type_marker(const std::string& text, bool color_for_missing)
166 {
167  if(color_for_missing) {
168  return formatter() << "<b><span color='#f00'>[" << text << "]</span></b> ";
169  } else {
170  return formatter() << "<b>[" << text << "]</b> ";
171  }
172 }
173 
174 } // end anon namespace
175 
176 game_info::game_info(const config& game, const std::vector<std::string>& installed_addons)
177  : id(game["id"])
178  , map_data(game["map_data"])
179  , name(font::escape_text(game["name"]))
180  , scenario()
181  , remote_scenario(false)
182  , map_info()
183  , map_size_info()
184  , era()
185  , gold(game["mp_village_gold"])
186  , support(game["mp_village_support"])
187  , xp(game["experience_modifier"].str() + "%")
188  , vision()
189  , status()
190  , time_limit()
191  , vacant_slots()
192  , current_turn(0)
193  , reloaded(game["savegame"].to_enum<mp_game_settings::SAVED_GAME_MODE>(mp_game_settings::SAVED_GAME_MODE::NONE) != mp_game_settings::SAVED_GAME_MODE::NONE)
194  , started(false)
195  , fog(game["mp_fog"].to_bool())
196  , shroud(game["mp_shroud"].to_bool())
197  , observers(game["observer"].to_bool(true))
198  , shuffle_sides(game["shuffle_sides"].to_bool(true))
199  , use_map_settings(game["mp_use_map_settings"].to_bool())
200  , registered_users_only(game["registered_users_only"].to_bool())
201  , verified(true)
202  , password_required(game["password"].to_bool())
203  , have_era(true)
204  , have_all_mods(true)
205  , has_friends(false)
206  , has_ignored(false)
207  , display_status(NEW)
208  , required_addons()
209  , addons_outcome(SATISFIED)
210 {
212 
213  // Parse the list of addons required to join this game.
214  for(const config& addon : game.child_range("addon")) {
215  if(addon.has_attribute("id")) {
216  if(std::find(installed_addons.begin(), installed_addons.end(), addon["id"].str()) == installed_addons.end()) {
217  required_addon r;
218  r.addon_id = addon["id"].str();
220 
221  // Use addon name if provided, else fall back on the addon id.
222  if(addon.has_attribute("name")) {
223  r.message = VGETTEXT("Missing addon: $name", {{"name", addon["name"].str()}});
224  } else {
225  r.message = VGETTEXT("Missing addon: $id", {{"id", addon["id"].str()}});
226  }
227 
228  required_addons.push_back(std::move(r));
229 
230  if(addons_outcome == SATISFIED) {
232  }
233  }
234  }
235  }
236 
237  if(!game["mp_era"].empty()) {
238  const config& era_cfg = game_config.find_child("era", "id", game["mp_era"]);
239  const bool require = game["require_era"].to_bool(true);
240  if(era_cfg) {
241  era = era_cfg["name"].str();
242 
243  if(require) {
244  ADDON_REQ result = check_addon_version_compatibility(era_cfg, game);
245  addons_outcome = std::max(addons_outcome, result); // Elevate to most severe error level encountered so far
246  }
247  } else {
248  have_era = !require;
249  era = game["mp_era_name"].str();
250  verified = false;
251 
252  if(!have_era) {
254  }
255  }
256  } else {
257  era = _("Unknown era");
258  verified = false;
259  }
260 
261  std::stringstream info_stream;
262  info_stream << era;
263 
264  for(const config& cfg : game.child_range("modification")) {
265  mod_info.emplace_back(cfg["name"].str(), true);
266  info_stream << ' ' << mod_info.back().first;
267 
268  if(cfg["require_modification"].to_bool(false)) {
269  if(const config& mod = game_config.find_child("modification", "id", cfg["id"])) {
270  ADDON_REQ result = check_addon_version_compatibility(mod, game);
271  addons_outcome = std::max(addons_outcome, result); // Elevate to most severe error level encountered so far
272  } else {
273  have_all_mods = false;
274  mod_info.back().second = false;
275 
277  }
278  }
279  }
280 
281  std::sort(mod_info.begin(), mod_info.end(), [](const auto& lhs, const auto& rhs) {
282  return translation::icompare(lhs.first, rhs.first) < 0;
283  });
284 
285  info_stream << ' ';
286 
287  if(map_data.empty()) {
288  map_data = filesystem::read_map(game["mp_scenario"]);
289  }
290 
291  if(map_data.empty()) {
292  info_stream << " — ??×??";
293  } else {
294  try {
295  gamemap map(std::make_shared<terrain_type_data>(game_config), map_data);
296  std::ostringstream msi;
297  msi << map.w() << font::unicode_multiplication_sign << map.h();
298  map_size_info = msi.str();
299  info_stream << spaced_em_dash() << map_size_info;
300  } catch(const incorrect_map_format_error&) {
301  verified = false;
302  } catch(const wml_exception& e) {
303  ERR_CF << "map could not be loaded: " << e.dev_message << '\n';
304  verified = false;
305  }
306  }
307 
308  info_stream << " ";
309 
310  //
311  // Check scenarios and campaigns
312  //
313  if(!game["mp_scenario"].empty() && game["mp_campaign"].empty()) {
314  // Check if it's a multiplayer scenario
315  const config* level_cfg = &game_config.find_child("multiplayer", "id", game["mp_scenario"]);
316  const bool require = game["require_scenario"].to_bool(false);
317 
318  // Check if it's a user map
319  if(!*level_cfg) {
320  level_cfg = &game_config.find_child("generic_multiplayer", "id", game["mp_scenario"]);
321  }
322 
323  if(*level_cfg) {
324  scenario = formatter() << make_game_type_marker(_("scenario_abbreviation^S"), false) << (*level_cfg)["name"].str();
325  info_stream << scenario;
326 
327  // Reloaded games do not match the original scenario hash, so it makes no sense
328  // to test them, since they always would appear as remote scenarios
329  if(!reloaded) {
330  if(const config& hashes = game_config.child("multiplayer_hashes")) {
331  std::string hash = game["hash"];
332  bool hash_found = false;
333  for(const auto & i : hashes.attribute_range()) {
334  if(i.first == game["mp_scenario"] && i.second == hash) {
335  hash_found = true;
336  break;
337  }
338  }
339 
340  if(!hash_found) {
341  remote_scenario = true;
342  info_stream << spaced_em_dash();
343  info_stream << _("Remote scenario");
344  verified = false;
345  }
346  }
347  }
348 
349  if(require) {
350  ADDON_REQ result = check_addon_version_compatibility((*level_cfg), game);
351  addons_outcome = std::max(addons_outcome, result); // Elevate to most severe error level encountered so far
352  }
353  } else {
354  if(require) {
355  addons_outcome = std::max(addons_outcome, NEED_DOWNLOAD); // Elevate to most severe error level encountered so far
356  }
357  scenario = formatter() << make_game_type_marker(_("scenario_abbreviation^S"), true) << game["mp_scenario_name"].str();
358  info_stream << scenario;
359  verified = false;
360  }
361  } else if(!game["mp_campaign"].empty()) {
362  if(const config& campaign_cfg = game_config.find_child("campaign", "id", game["mp_campaign"])) {
363  std::stringstream campaign_text;
364  campaign_text
365  << make_game_type_marker(_("campaign_abbreviation^C"), false)
366  << campaign_cfg["name"] << spaced_em_dash()
367  << game["mp_scenario_name"];
368 
369  // Difficulty
370  config difficulties = gui2::dialogs::generate_difficulty_config(campaign_cfg);
371  for(const config& difficulty : difficulties.child_range("difficulty")) {
372  if(difficulty["define"] == game["difficulty_define"]) {
373  campaign_text << spaced_em_dash() << difficulty["description"];
374 
375  break;
376  }
377  }
378 
379  scenario = campaign_text.str();
380  info_stream << campaign_text.rdbuf();
381 
382  // TODO: should we have this?
383  //if(game["require_scenario"].to_bool(false)) {
384  ADDON_REQ result = check_addon_version_compatibility(campaign_cfg, game);
385  addons_outcome = std::max(addons_outcome, result); // Elevate to most severe error level encountered so far
386  //}
387  } else {
388  scenario = formatter() << make_game_type_marker(_("campaign_abbreviation^C"), true) << game["mp_campaign_name"].str();
389  info_stream << scenario;
390  verified = false;
391  }
392  } else {
393  scenario = _("Unknown scenario");
394  info_stream << scenario;
395  verified = false;
396  }
397 
398  // Remove any newlines that might have been in game titles
399  boost::replace_all(scenario, "\n", " " + font::unicode_em_dash + " ");
400 
401  if(reloaded) {
402  info_stream << spaced_em_dash();
403  info_stream << _("Reloaded game");
404  verified = false;
405  }
406 
407  // These should always be present in the data the server sends, but may or may not be empty.
408  // I'm just using child_or_empty here to preempt any cases where they might not be included.
409  const config& s = game.child_or_empty("slot_data");
410  const config& t = game.child_or_empty("turn_data");
411 
412  if(!s.empty()) {
413  started = false;
414 
415  vacant_slots = s["vacant"].to_unsigned();
416 
417  if(vacant_slots > 0) {
418  status = formatter() << _n("Vacant Slot:", "Vacant Slots:", vacant_slots) << " " << vacant_slots << "/" << s["max"];
419  } else {
420  status = _("mp_game_available_slots^Full");
421  }
422  }
423 
424  if(!t.empty()) {
425  started = true;
426 
427  current_turn = t["current"].to_unsigned();
428  const int max_turns = t["max"].to_int();
429 
430  if(max_turns > -1) {
431  status = formatter() << _("Turn") << " " << t["current"] << "/" << max_turns;
432  } else {
433  status = formatter() << _("Turn") << " " << t["current"];
434  }
435  }
436 
437  if(fog) {
438  vision = _("Fog");
439  if(shroud) {
440  vision += "/";
441  vision += _("Shroud");
442  }
443  } else if(shroud) {
444  vision = _("Shroud");
445  } else {
446  vision = _("vision^none");
447  }
448 
449  if(game["mp_countdown"].to_bool()) {
451  << game["mp_countdown_init_time"].str() << "+"
452  << game["mp_countdown_turn_bonus"].str() << "/"
453  << game["mp_countdown_action_bonus"].str();
454  } else {
455  time_limit = _("time limit^none");
456  }
457 
458  map_info = info_stream.str();
459 }
460 
462 {
463  if(!local_item.has_attribute("addon_id") || !local_item.has_attribute("addon_version")) {
464  return SATISFIED;
465  }
466 
467  if(const config& game_req = game.find_child("addon", "id", local_item["addon_id"])) {
468  required_addon r {local_item["addon_id"].str(), SATISFIED, ""};
469 
470  // Local version
471  const version_info local_ver(local_item["addon_version"].str());
472  version_info local_min_ver(local_item.has_attribute("addon_min_version") ? local_item["addon_min_version"] : local_item["addon_version"]);
473 
474  // If the UMC didn't specify last compatible version, assume no backwards compatibility.
475  // Also apply some sanity checking regarding min version; if the min ver doesn't make sense, ignore it.
476  local_min_ver = std::min(local_min_ver, local_ver);
477 
478  // Remote version
479  const version_info remote_ver(game_req["version"].str());
480  version_info remote_min_ver(game_req.has_attribute("min_version") ? game_req["min_version"] : game_req["version"]);
481 
482  remote_min_ver = std::min(remote_min_ver, remote_ver);
483 
484  // Check if the host is too out of date to play.
485  if(local_min_ver > remote_ver) {
486  DBG_LB << "r.outcome = CANNOT_SATISFY for item='" << local_item["id"]
487  << "' addon='" << local_item["addon_id"]
488  << "' addon_min_version='" << local_item["addon_min_version"]
489  << "' addon_min_version_parsed='" << local_min_ver.str()
490  << "' addon_version='" << local_item["addon_version"]
491  << "' remote_ver='" << remote_ver.str()
492  << "'\n";
493  r.outcome = CANNOT_SATISFY;
494 
495  r.message = VGETTEXT("The host's version of <i>$addon</i> is incompatible. They have version <b>$host_ver</b> while you have version <b>$local_ver</b>.", {
496  {"addon", local_item["addon_title"].str()},
497  {"host_ver", remote_ver.str()},
498  {"local_ver", local_ver.str()}
499  });
500 
501  required_addons.push_back(r);
502  return r.outcome;
503  }
504 
505  // Check if our version is too out of date to play.
506  if(remote_min_ver > local_ver) {
507  r.outcome = NEED_DOWNLOAD;
508 
509  r.message = VGETTEXT("Your version of <i>$addon</i> is incompatible. You have version <b>$local_ver</b> while the host has version <b>$host_ver</b>.", {
510  {"addon", local_item["addon_title"].str()},
511  {"host_ver", remote_ver.str()},
512  {"local_ver", local_ver.str()}
513  });
514 
515  required_addons.push_back(r);
516  return r.outcome;
517  }
518  }
519 
520  return SATISFIED;
521 }
522 
524 {
525  return !started && vacant_slots > 0;
526 }
527 
529 {
531 }
532 
534 {
535  switch(display_status) {
536  case game_info::CLEAN:
537  return "clean";
538  case game_info::NEW:
539  return "new";
540  case game_info::DELETED:
541  return "deleted";
542  case game_info::UPDATED:
543  return "updated";
544  default:
545  ERR_CF << "BAD display_status " << display_status << " in game " << id << "\n";
546  return "?";
547  }
548 }
549 
550 bool game_info::match_string_filter(const std::string& filter) const
551 {
552  const std::string& s1 = name;
553  const std::string& s2 = map_info;
554  return std::search(s1.begin(), s1.end(), filter.begin(), filter.end(),
555  chars_equal_insensitive) != s1.end()
556  || std::search(s2.begin(), s2.end(), filter.begin(), filter.end(),
557  chars_equal_insensitive) != s2.end();
558 }
559 
560 }
std::string scenario
Definition: lobby_data.hpp:148
std::string map_size_info
Definition: lobby_data.hpp:151
config & child(config_key_type key, int n=0)
Returns the nth child with the given key, or a reference to an invalid config if there is none...
Definition: config.cpp:420
void add_message(const std::time_t &timestamp, const std::string &user, const std::string &message)
Definition: lobby_data.cpp:63
int h() const
Effective map height, in hexes.
Definition: map.hpp:128
ADDON_REQ addons_outcome
Definition: lobby_data.hpp:199
std::string status
Definition: lobby_data.hpp:161
std::string era()
Definition: game.cpp:709
#define ERR_CF
Definition: lobby_data.cpp:41
Interfaces for manipulating version numbers of engine, add-ons, etc.
std::vector< std::pair< std::string, bool > > mod_info
List of modification names and whether they&#39;re installed or not.
Definition: lobby_data.hpp:155
bool is_authenticated()
Definition: game.cpp:181
Note: Specific to sdl_ttf.
unsigned int current_turn
Definition: lobby_data.hpp:165
std::deque< chat_message > history_
Definition: lobby_data.hpp:61
config & find_child(config_key_type key, const std::string &name, const std::string &value)
Returns the first child of tag key with a name attribute containing value.
Definition: config.cpp:836
Add a special kind of assert to validate whether the input from WML doesn&#39;t contain any problems that...
New lexcical_cast header.
bool has_attribute(config_key_type key) const
Definition: config.cpp:213
user_state state
Definition: lobby_data.hpp:130
child_itors child_range(config_key_type key)
Definition: config.cpp:362
bool shuffle_sides()
Definition: game.cpp:484
std::set< std::string > members_
Definition: lobby_data.hpp:96
std::string map_info
Definition: lobby_data.hpp:150
bool chars_equal_insensitive(char a, char b)
Definition: general.hpp:21
bool remote_scenario
Definition: lobby_data.hpp:149
Definitions for the interface to Wesnoth Markup Language (WML).
std::string name
Definition: lobby_data.hpp:147
std::string time_limit
Definition: lobby_data.hpp:162
#define b
static lg::log_domain log_lobby("lobby")
bool fog()
Definition: game.cpp:549
Pubic entry points for the MP workflow.
Definition: lobby_data.cpp:50
static game_config_manager * get()
user_info(const config &c)
Definition: lobby_data.cpp:109
static UNUSEDNOWARN std::string _(const char *str)
Definition: gettext.hpp:91
chat_message(const std::time_t &timestamp, const std::string &user, const std::string &message)
Create a chat message.
Definition: lobby_data.cpp:52
bool is_friend(const std::string &nick)
Definition: game.cpp:303
std::ostringstream wrapper.
Definition: formatter.hpp:38
#define DBG_LB
Definition: lobby_data.cpp:46
std::string vision
Definition: lobby_data.hpp:160
const std::string unicode_multiplication_sign
Definition: constants.cpp:42
Encapsulates the map of the game.
Definition: map.hpp:36
static UNUSEDNOWARN std::string _n(const char *str1, const char *str2, int n)
Definition: gettext.hpp:95
static lg::log_domain log_config("config")
std::string map_data
Definition: lobby_data.hpp:146
std::vector< std::string > installed_addons()
Retrieves the names of all installed add-ons.
Definition: manager.cpp:147
bool is_member(const std::string &user) const
Definition: lobby_data.cpp:85
bool registered_users_only()
Definition: game.cpp:474
bool is_ignored(const std::string &nick)
Definition: game.cpp:316
std::string read_map(const std::string &name)
Helper class, don&#39;t construct this directly.
std::string login()
std::string name
Definition: lobby_data.hpp:127
std::string dev_message
The message for developers telling which problem was triggered, this shouldn&#39;t be translated...
bool shroud()
Definition: game.cpp:559
int w() const
Effective map width, in hexes.
Definition: map.hpp:125
std::string escape_text(const std::string &text)
Escapes the pango markup characters in a text.
Definition: escape.hpp:32
const char * display_status_string() const
Definition: lobby_data.cpp:533
std::size_t i
Definition: function.cpp:933
static lg::log_domain log_engine("engine")
Default, unset return value.
Definition: retval.hpp:31
config generate_difficulty_config(const config &source)
Helper function to convert old difficulty markup.
Game configuration data as global variables.
Definition: build_info.cpp:49
static map_location::DIRECTION s
ADDON_REQ check_addon_version_compatibility(const config &local_item, const config &game)
Definition: lobby_data.cpp:461
bool use_map_settings()
Definition: game.cpp:502
This class represents the information a client has about a room.
Definition: lobby_data.hpp:67
Declarations for File-IO.
bool can_observe() const
Definition: lobby_data.cpp:528
static int sort(lua_State *L)
Definition: ltablib.cpp:411
#define VGETTEXT(msgid,...)
Handy wrappers around interpolate_variables_into_string and gettext.
Represents version numbers.
std::string era
Definition: lobby_data.hpp:152
This class represents the information a client has about another player.
Definition: lobby_data.hpp:104
void update_state(int selected_game_id, const room_info *current_room=nullptr)
Definition: lobby_data.cpp:120
room_info(const std::string &name)
Definition: lobby_data.cpp:81
double t
Definition: astarsearch.cpp:64
bool find(E event, F functor)
Tests whether an event handler is available.
static bool timestamp
Definition: log.cpp:45
int icompare(const std::string &s1, const std::string &s2)
Case-insensitive lexicographical comparison.
Definition: gettext.cpp:476
std::size_t vacant_slots
Definition: lobby_data.hpp:163
const std::string unicode_em_dash
Definition: constants.cpp:40
void remove_member(const std::string &user)
Definition: lobby_data.cpp:95
Standard logging facilities (interface).
std::string str() const
Serializes the version number into string form.
game_display_status display_status
Definition: lobby_data.hpp:188
std::vector< required_addon > required_addons
Definition: lobby_data.hpp:198
void update_relation()
Definition: lobby_data.cpp:139
#define e
game_info(const config &c, const std::vector< std::string > &installed_addons)
Definition: lobby_data.cpp:176
const config & child_or_empty(config_key_type key) const
Returns the first child with the given key, or an empty config if there is none.
Definition: config.cpp:453
user_relation relation
Definition: lobby_data.hpp:129
A config object defines a single node in a WML file, with access to child nodes.
Definition: config.hpp:68
bool can_join() const
Definition: lobby_data.cpp:523
mock_char c
bool operator<(const user_info &b) const
Definition: lobby_data.cpp:152
std::string str() const
Definition: formatter.hpp:60
bool empty() const
Definition: config.cpp:884
const config & game_config() const
void process_room_members(const config &data)
Definition: lobby_data.cpp:100
bool match_string_filter(const std::string &filter) const
Definition: lobby_data.cpp:550
const std::string & name() const
Definition: lobby_data.hpp:72
void add_member(const std::string &user)
Definition: lobby_data.cpp:90