string hostversion = ReadString();
bool version_mismatch = ReadByte();
bool version_check = ReadByte();
+ srv_minplayers = ReadByte();
+ srv_maxplayers = ReadByte();
string modifications = translate_modifications(ReadString());
string weaponarena_list = translate_weaponarena(ReadString());
string cache_mutatormsg = ReadString();
msg = strcat(msg, "^8\n\n", strcat(_("Gametype:"), " ^1", MapInfo_Type_ToText(gametype)), "^8\n");
+ if (srv_minplayers || srv_maxplayers)
+ {
+ msg = strcat(msg, "^8\n", _("This match supports"), " ^5");
+ if (srv_minplayers == srv_maxplayers)
+ msg = strcat(msg, sprintf(_("%d players"), srv_maxplayers), "^8\n");
+ else if (srv_minplayers && srv_maxplayers)
+ msg = strcat(msg, sprintf(_("%d to %d players"), srv_minplayers, srv_maxplayers), "^8\n");
+ else if (srv_maxplayers)
+ msg = strcat(msg, sprintf(_("%d players maximum"), srv_maxplayers), "^8\n");
+ else
+ msg = strcat(msg, sprintf(_("%d players minimum"), srv_minplayers), "^8\n");
+ }
+
modifications = cons_mid(modifications, ", ", weaponarena_list);
if(modifications != "")
msg = strcat(msg, "^8\n", _("Active modifications:"), " ^3", modifications, "^8\n");
WriteString(msg_type, autocvar_g_xonoticversion);
WriteByte(msg_type, CS(this).version_mismatch);
WriteByte(msg_type, (CS(this).version < autocvar_gameversion));
+ WriteByte(msg_type, map_minplayers);
+ WriteByte(msg_type, GetPlayerLimit());
MUTATOR_CALLHOOK(BuildMutatorsPrettyString, "");
string modifications = M_ARGV(0, string);