Client Specific AFK Timeout

Too many schedules for all clients
This commit is contained in:
ChocoTaco 2019-06-08 01:40:09 -04:00
parent cf82816aa6
commit e0f369d061
3 changed files with 25 additions and 6 deletions

View file

@ -8,6 +8,7 @@ $Host::AllowMapScript = "True";
$Host::AnimateWithTransitions = 0;
$Host::AntiCloakEnable = 1;
$Host::AntiCloakPlayerCount = 6;
$Host::AFKTimeout = 3;
$Host::BanTime = 2147483647;
$Host::BotCount = 2;
$Host::BotsEnabled = 0;
@ -164,7 +165,6 @@ $Host::EvoTKWarn2 = 6;
$Host::EvoTourneySameMap = 1;
$Host::EvoUseHighPerformanceCounter = 0;
$Host::FloodProtectionEnabled = 1;
$Host::AFKTime = 1;
$Host::GameName = "Discord PU";
$Host::HiVisibility = "1";
$Host::holoName1 = "Storm";

View file

@ -1,12 +1,15 @@
//Observer AFK
//AFK Timeout
//Script BY: DarkTiger
//
//TacoServer:
//Change to how many minutes to set forced Observer for AFK players
//Setting to 0 disables this feature
//$Host::AFKTime = 1;
//$Host::AFKTimeout = 1;
//
//Client specific to save on schedules
//Add clients who are normally AFK
$dtVar::AFKtime = 60000 * $Host::AFKTime;//if player is afk specific amount of time, force them into observer
$dtVar::AFKtime = 60000 * $Host::AFKTimeout;//if player is afk specific amount of time, force them into observer
$dtVar::AFKloop = 1000 * 30;//loop check timer currently set to 30 secs
////////////////////////////////////////////////////////////////////////////////
@ -18,8 +21,24 @@ function GameConnection::onConnect(%client, %name, %raceGender, %skin, %voice, %
{
Parent::onConnect( %client, %name, %raceGender, %skin, %voice, %voicePitch );
%guid = %client.guid;
//Add clients here
%AFKWatchList1 = "";
%AFKWatchList2 = "";
%AFKWatchList3 = "";
%AFKWatchList4 = "";
if($dtVar::AFKtime > 0)
%client.afkLoopCheck();// starts it
{
if(%guid $= %AFKWatchList1 || %guid $= %AFKWatchList2 || %guid $= %AFKWatchList3 || %guid $= %AFKWatchList4 )
{
if(%guid $= "")
return;
%client.afkLoopCheck();// starts it
}
}
}
};

View file

@ -203,7 +203,7 @@ $Host::loadingmsgline3 = "Required Mappacks: "; //Loading screen msg lin
$Host::loadingmsgline3content = "S5 S8 TWL TWL2"; //Loading screen msg content 3
$Host::loadingmsgline4 = "Hosted by: "; //Loading screen msg line 4
$Host::loadingmsgline4content = "Branzone"; //Loading screen msg content 4
$Host::AFKTime = 1; //Time in minutes to put AFK player in observer mode, 0 disables it
$Host::AFKTimeout = 3; //Time in minutes to put AFK player in observer mode, 0 disables it
//LakRabbit
$Host::EnableLakUnlimitedDJ = 1; //Unlimited disc-jumps if enabled
$Host::LakRabbitNoSplashDamage = 0; //Splash Damage enabled or not