Files
vgstation13/code/controllers/subsystem/inactivity.dm
Pieter-Jan Briers 4970cde248 In which /vg/station13 gets high. (#13270)
* Code done. Doesn't compile for shit.

* IT COMPILES!

* Hey it almost works.

* Fixes lighting

* Remove thing I had to double check after asking mso.

* More fixes.

* WiP, fixed everything but waitfor

* Done.

* Damnit DM.

* Fixes priorities
2017-01-11 13:43:38 -05:00

23 lines
628 B
Plaintext

var/datum/subsystem/inactivity/SSinactivity
/datum/subsystem/inactivity
name = "Inactivity"
wait = INACTIVITY_KICK
flags = SS_NO_INIT | SS_BACKGROUND | SS_FIRE_IN_LOBBY
priority = SS_PRIORITY_INACTIVITY
/datum/subsystem/inactivity/New()
NEW_SS_GLOBAL(SSinactivity)
/datum/subsystem/inactivity/fire(resumed = FALSE)
if (config.kick_inactive)
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='warning'>You have been inactive for more than 10 minutes and have been disconnected.</SPAN>")
del(C)