Adds a timer to staffwho AFK notifications.

This commit is contained in:
Jon
2016-02-27 21:57:40 +00:00
parent c7e9acbdad
commit f20713e668
2 changed files with 15 additions and 3 deletions

View File

@@ -86,7 +86,10 @@
msg += " - Playing" msg += " - Playing"
if(C.is_afk()) 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" msg += "\n"
num_admins_online++ num_admins_online++
@@ -101,7 +104,10 @@
modmsg += " - Playing" modmsg += " - Playing"
if(C.is_afk()) 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" modmsg += "\n"
num_mods_online++ num_mods_online++
@@ -115,7 +121,10 @@
mentmsg += " - Playing" mentmsg += " - Playing"
if(C.is_afk()) 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" mentmsg += "\n"
num_mentors_online++ num_mentors_online++

View File

@@ -281,6 +281,9 @@
if(inactivity > duration) return inactivity if(inactivity > duration) return inactivity
return 0 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 //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() /client/proc/send_resources()