From 65a0eefcf7843796b70f44a722c999cec1a1fa5d Mon Sep 17 00:00:00 2001 From: "rastaf.zero@gmail.com" Date: Mon, 18 Apr 2011 15:47:20 +0000 Subject: [PATCH] Added option KICK_INACTIVE. Uncomment it in config.txt if you want to disconnect inactive players. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1472 316c924e-a436-60f5-8080-3fe189b3f50e --- code/datums/configuration.dm | 3 +++ code/game/algorithm.dm | 13 +++++++------ config/config.txt | 3 +++ 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/code/datums/configuration.dm b/code/datums/configuration.dm index 7e86fe2f474..8ca837944a4 100644 --- a/code/datums/configuration.dm +++ b/code/datums/configuration.dm @@ -34,6 +34,7 @@ var/hostedby = null var/respawn = 1 var/guest_jobban = 1 + var/kick_inactive = 0 //force disconnect for inactive players var/server var/banappeals @@ -196,6 +197,8 @@ diary << "Unknown game mode probability configuration definition: [prob_name]." else diary << "Incorrect probability configuration definition: [prob_name] [prob_value]." + if ("kick_inactive") + config.kick_inactive = text2num(value) else diary << "Unknown setting in configuration: '[name]'" diff --git a/code/game/algorithm.dm b/code/game/algorithm.dm index f7dce4fc66c..772e8032498 100644 --- a/code/game/algorithm.dm +++ b/code/game/algorithm.dm @@ -15,12 +15,13 @@ LoadBans() process_teleport_locs() //Sets up the wizard teleport locations process_ghost_teleport_locs() //Sets up ghost teleport locations. - - spawn(30) - //EXPERIMENTAL - Optimize() - sleep_offline = 1 - //EXPERIMENTAL + sleep_offline = 1 + + if (config.kick_inactive) + spawn(30) + //EXPERIMENTAL + Optimize() + //EXPERIMENTAL spawn(0) SetupOccupationsList() diff --git a/config/config.txt b/config/config.txt index 399627f27da..2224d6bf9c1 100644 --- a/config/config.txt +++ b/config/config.txt @@ -22,6 +22,9 @@ LOG_WHISPER # sql switching # SQL_ENABLED +#disconnect players who did nothing during 10 minutes +# KICK_INACTIVE + # probablities for game modes chosen in "secret" and "random" modes # # default probablity is 1, increase to make that mode more likely to be picked