Use current production _serversettings.gsc

This commit is contained in:
efinst0rm 2023-04-15 12:39:41 -05:00
parent 230bd784f2
commit c5091bef79
2 changed files with 10 additions and 15 deletions

View File

@ -3,11 +3,9 @@
#using scripts\shared\callbacks_shared; #using scripts\shared\callbacks_shared;
#using scripts\shared\system_shared; #using scripts\shared\system_shared;
#insert scripts\shared\shared.gsh;
#namespace serversettings; #namespace serversettings;
REGISTER_SYSTEM( "serversettings", &__init__, undefined ) function autoexec __init__sytem__() { system::register("serversettings",&__init__,undefined,undefined); }
function __init__() function __init__()
{ {
@ -17,29 +15,25 @@ function __init__()
function init() function init()
{ {
level.hostname = GetDvarString( "sv_hostname"); level.hostname = GetDvarString( "sv_hostname");
if (level.hostname == "") if(level.hostname == "")
{
level.hostname = "CoDHost"; level.hostname = "CoDHost";
}
SetDvar("sv_hostname", level.hostname); SetDvar("sv_hostname", level.hostname);
SetDvar("ui_hostname", level.hostname); SetDvar("ui_hostname", level.hostname);
//makeDvarServerInfo("ui_hostname", "CoDHost");
level.motd = GetDvarString( "scr_motd" ); level.motd = GetDvarString( "scr_motd" );
if(level.motd == "") if(level.motd == "")
{
level.motd = ""; level.motd = "";
}
SetDvar("scr_motd", level.motd); SetDvar("scr_motd", level.motd);
SetDvar("ui_motd", level.motd); SetDvar("ui_motd", level.motd);
//makeDvarServerInfo("ui_motd", "");
level.allowvote = GetDvarString( "g_allowvote" ); level.allowvote = GetDvarString( "g_allowvote" );
if(level.allowvote == "") if(level.allowvote == "")
{
level.allowvote = "1"; level.allowvote = "1";
}
SetDvar("g_allowvote", level.allowvote); SetDvar("g_allowvote", level.allowvote);
SetDvar("ui_allowvote", level.allowvote); SetDvar("ui_allowvote", level.allowvote);
//makeDvarServerInfo("ui_allowvote", "1");
level.allow_teamchange = "1"; level.allow_teamchange = "1";
SetDvar("ui_allow_teamchange", level.allow_teamchange); SetDvar("ui_allow_teamchange", level.allow_teamchange);
@ -47,6 +41,7 @@ function init()
level.friendlyfire = GetGametypeSetting( "friendlyfiretype" ); level.friendlyfire = GetGametypeSetting( "friendlyfiretype" );
SetDvar("ui_friendlyfire", level.friendlyfire); SetDvar("ui_friendlyfire", level.friendlyfire);
//makeDvarServerInfo("ui_friendlyfire", "0");
if(GetDvarString( "scr_mapsize") == "") if(GetDvarString( "scr_mapsize") == "")
SetDvar("scr_mapsize", "64"); SetDvar("scr_mapsize", "64");
@ -88,7 +83,7 @@ function update()
SetDvar("ui_motd", level.motd); SetDvar("ui_motd", level.motd);
} }
g_allowvote = GetDvarString( "g_allowvote"); g_allowvote = GetDvarString( "g_allowvote" );
if(level.allowvote != g_allowvote) if(level.allowvote != g_allowvote)
{ {
level.allowvote = g_allowvote; level.allowvote = g_allowvote;