Cleanup dedicated info

This commit is contained in:
momo5502 2023-02-18 19:12:53 +01:00
parent a1778d5f5e
commit ccbb8e411c

View File

@ -20,14 +20,13 @@ namespace dedicated_info
if (!sv_running || !sv_running->current.enabled) if (!sv_running || !sv_running->current.enabled)
{ {
std::string idle_text = server_name + " - not running"; console::set_title(server_name + " - not running");
console::set_title(idle_text);
return; return;
} }
const auto mapname = game::get_dvar_string("mapname"); const auto mapname = game::get_dvar_string("mapname");
std::string window_text = utils::string::va("%s on %s [%d/%d] (%d)", const std::string window_text = utils::string::va("%s on %s [%d/%d] (%d)",
server_name.data(), server_name.data(),
mapname.data(), mapname.data(),
getinfo::get_client_count(), getinfo::get_client_count(),
@ -37,6 +36,7 @@ namespace dedicated_info
console::set_title(window_text); console::set_title(window_text);
} }
} }
class component final : public server_component class component final : public server_component
{ {
public: public: