Securitylevel serverinfo stuff

This commit is contained in:
momo5502 2016-08-14 16:01:24 +02:00
parent 0e793af68b
commit 7def8890e9
3 changed files with 4 additions and 0 deletions

View File

@ -49,6 +49,7 @@ namespace Components
Dvar::Var("uiSi_ServerName").Set(info->Hostname);
Dvar::Var("uiSi_MaxClients").Set(info->Clients);
Dvar::Var("uiSi_Version").Set(info->Shortversion);
Dvar::Var("uiSi_SecurityLevel").Set(info->SecurityLevel);
Dvar::Var("uiSi_isPrivate").Set(info->Password ? "@MENU_YES" : "@MENU_NO");
Dvar::Var("uiSi_Hardcore").Set(info->Hardcore ? "@MENU_ENABLED" : "@MENU_DISABLED");
Dvar::Var("uiSi_KillCam").Set("@MENU_NO");
@ -208,6 +209,7 @@ namespace Components
Dvar::Var("uiSi_ServerName").Set(info.Get("sv_hostname"));
Dvar::Var("uiSi_MaxClients").Set(info.Get("sv_maxclients"));
Dvar::Var("uiSi_Version").Set(info.Get("shortversion"));
Dvar::Var("uiSi_SecurityLevel").Set(info.Get("sv_securityLevel"));
Dvar::Var("uiSi_isPrivate").Set(info.Get("isPrivate") == "0" ? "@MENU_NO" : "@MENU_YES");
Dvar::Var("uiSi_Hardcore").Set(info.Get("g_hardcore") == "0" ? "@MENU_DISABLED" : "@MENU_ENABLED");
Dvar::Var("uiSi_KillCam").Set(info.Get("scr_game_allowkillcam") == "0" ? "@MENU_NO" : "@MENU_YES");

View File

@ -398,6 +398,7 @@ namespace Components
server.Mod = info.Get("fs_game");
server.MatchType = atoi(info.Get("matchtype").data());
server.Clients = atoi(info.Get("clients").data());
server.SecurityLevel = atoi(info.Get("securityLevel").data());
server.MaxClients = atoi(info.Get("sv_maxclients").data());
server.Password = (atoi(info.Get("isPrivate").data()) != 0);
server.Hardcore = (atoi(info.Get("hc").data()) != 0);

View File

@ -19,6 +19,7 @@ namespace Components
bool Password;
int Ping;
int MatchType;
int SecurityLevel;
bool Hardcore;
};