mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-01-06 07:23:16 +00:00
Adds processes, next step is to replace them in the current MC and ticker
This commit is contained in:
16
code/controllers/Processes/inactivity.dm
Normal file
16
code/controllers/Processes/inactivity.dm
Normal file
@@ -0,0 +1,16 @@
|
||||
/datum/controller/process/inactivity/setup()
|
||||
name = "inactivity"
|
||||
schedule_interval = INACTIVITY_KICK
|
||||
|
||||
/datum/controller/process/inactivity/doWork()
|
||||
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)]")
|
||||
C << "<SPAN CLASS='warning'>You have been inactive for more than 10 minutes and have been disconnected.</SPAN>"
|
||||
del(C)
|
||||
|
||||
scheck()
|
||||
|
||||
#undef INACTIVITY_KICK
|
||||
Reference in New Issue
Block a user