Merge pull request #7037 from VOREStation/upstream-merge-6886

[MIRROR] Inactivity subsystem kicks ghosts and admins again
This commit is contained in:
Aronai Sieyes
2020-03-30 13:15:44 -04:00
committed by GitHub
+8 -2
View File
@@ -15,8 +15,7 @@ SUBSYSTEM_DEF(inactivity)
while(client_list.len)
var/client/C = client_list[client_list.len]
client_list.len--
if(!C.holder && C.is_afk(config.kick_inactive MINUTES) && !isobserver(C.mob))
if(C.is_afk(config.kick_inactive MINUTES) && can_kick(C))
to_chat(C, "<span class='warning'>You have been inactive for more than [config.kick_inactive] minute\s and have been disconnected.</span>")
var/information
@@ -34,6 +33,9 @@ SUBSYSTEM_DEF(inactivity)
if(job)
information = " while [job]."
else if(isobserver(C.mob))
information = " while a ghost."
else if(issilicon(C.mob))
information = " while a silicon."
if(isAI(C.mob))
@@ -56,3 +58,7 @@ SUBSYSTEM_DEF(inactivity)
/datum/controller/subsystem/inactivity/stat_entry()
..("Kicked: [number_kicked]")
/datum/controller/subsystem/inactivity/proc/can_kick(var/client/C)
if(C.holder) return FALSE //VOREStation Add - Don't kick admins.
return TRUE