diff --git a/code/game/verbs/who.dm b/code/game/verbs/who.dm index f12d774137..7580b76fff 100644 --- a/code/game/verbs/who.dm +++ b/code/game/verbs/who.dm @@ -86,7 +86,10 @@ msg += " - Playing" if(C.is_afk()) - msg += " (AFK)" + var/seconds = C.last_activity_seconds() + msg += " (AFK - " + msg += "[round(seconds / 60)] minutes, " + msg += "[seconds % 60] seconds)" msg += "\n" num_admins_online++ @@ -101,7 +104,10 @@ modmsg += " - Playing" if(C.is_afk()) - modmsg += " (AFK)" + var/seconds = C.last_activity_seconds() + modmsg += " (AFK - " + modmsg += "[round(seconds / 60)] minutes, " + modmsg += "[seconds % 60] seconds)" modmsg += "\n" num_mods_online++ @@ -115,7 +121,10 @@ mentmsg += " - Playing" if(C.is_afk()) - mentmsg += " (AFK)" + var/seconds = C.last_activity_seconds() + mentmsg += " (AFK - " + mentmsg += "[round(seconds / 60)] minutes, " + mentmsg += "[seconds % 60] seconds)" mentmsg += "\n" num_mentors_online++ diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index 0d34aa7659..aa1cf3b1ad 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -281,6 +281,9 @@ if(inactivity > duration) return inactivity return 0 +/client/proc/last_activity_seconds() + return inactivity / 10 + //send resources to the client. It's here in its own proc so we can move it around easiliy if need be /client/proc/send_resources()