mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Merge pull request #1095 from EmperorJon/27_Feb._AFK
Adds a timer to staffwho AFK notifications.
This commit is contained in:
@@ -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++
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user