Afk fixup (#412)

This commit is contained in:
CitadelStationBot
2017-04-15 14:45:29 -05:00
committed by TalkingCactus
parent f510bf2a03
commit 2373e2e485
6 changed files with 24 additions and 15 deletions
+5 -4
View File
@@ -10,12 +10,13 @@ SUBSYSTEM_DEF(server_maint)
/datum/controller/subsystem/server_maint/fire()
//handle kicking inactive players
if(config.kick_inactive > 0)
if(config.kick_inactive)
for(var/client/C in GLOB.clients)
if(C.is_afk(INACTIVITY_KICK))
if(!istype(C.mob, /mob/dead))
if(C.is_afk(config.afk_period))
var/cmob = C.mob
if(!(istype(cmob, /mob/dead/observer) || (istype(cmob, /mob/dead) && C.holder)))
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>")
to_chat(C, "<span class='danger'>You have been inactive for more than [config.afk_period / 600] minutes and have been disconnected.</span>")
qdel(C)
if(config.sql_enabled)