mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
As requested by a few staff members, this serves to keep the staffwho list more representative of who is actually available to help. The current inactivity timer is rather generous so hopefully this won't impede admins who are actually there.
15 lines
610 B
Plaintext
15 lines
610 B
Plaintext
/datum/controller/process/inactivity/setup()
|
|
name = "inactivity"
|
|
schedule_interval = 600 // Once every minute (approx.)
|
|
|
|
/datum/controller/process/inactivity/doWork()
|
|
if(config.kick_inactive)
|
|
for(last_object in clients)
|
|
var/client/C = last_object
|
|
if(C.is_afk(config.kick_inactive MINUTES))
|
|
if(!istype(C.mob, /mob/observer/dead))
|
|
log_access("AFK: [key_name(C)]")
|
|
C << "<SPAN CLASS='warning'>You have been inactive for more than [config.kick_inactive] minute\s and have been disconnected.</SPAN>"
|
|
del(C) // Don't qdel, cannot override finalize_qdel behaviour for clients.
|
|
SCHECK
|