Files
fulpstation/code/controllers/subsystem/server_maintenance.dm
Jordie 127d1f6daf Combines legacy_population and sanitizes death queries (#24914)
* combines admin and player pop count and sanitizes death queries

* renames proc

* removes proc call to sql_poll_admins

* add tox- clone- and staminaloss to death table

* adds ip and port to legacy_population

* null ip and cid handling for bans

* sans colons
2017-03-16 13:01:52 +01:00

28 lines
775 B
Plaintext

var/datum/controller/subsystem/server_maint/SSserver
/datum/controller/subsystem/server_maint
name = "Server Tasks"
wait = 6000
flags = SS_NO_TICK_CHECK
/datum/controller/subsystem/server_maint/New()
NEW_SS_GLOBAL(SSserver)
/datum/controller/subsystem/server_maint/Initialize(timeofday)
if (config.hub)
world.visibility = 1
..()
/datum/controller/subsystem/server_maint/fire()
//handle kicking inactive players
if(config.kick_inactive > 0)
for(var/client/C in clients)
if(C.is_afk(INACTIVITY_KICK))
if(!istype(C.mob, /mob/dead))
log_access("AFK: [key_name(C)]")
to_chat(C, "<span class='danger'>You have been inactive for more than 10 minutes and have been disconnected.</span>")
qdel(C)
if(config.sql_enabled)
sql_poll_population()