From 301682f7fa75e75c865c001577bd0afc2bb74b97 Mon Sep 17 00:00:00 2001 From: cib Date: Thu, 19 Jan 2012 20:47:52 -0800 Subject: [PATCH] Added a Active Players verb. This verb shows you how many players are currently in the game and have been active in the last 10 minutes. --- code/game/verbs/who.dm | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/code/game/verbs/who.dm b/code/game/verbs/who.dm index 8ce32872d50..0660b1bfbea 100644 --- a/code/game/verbs/who.dm +++ b/code/game/verbs/who.dm @@ -34,3 +34,16 @@ usr << "[M.key] is a [M.client.holder.rank][M.client.stealth ? " (as [M.client.fakekey])" : ""]" else if(!M.client.stealth && (M.client.holder.level != -3)) usr << "\t[M.client]" + +/client/verb/active_players() + set category = "OOC" + set name = "Active Players" + var/total = 0 + for(var/mob/living/M in world) + if(!M.client) continue + if(M.client.inactivity > 10 * 60 * 10) continue + if(M.stat == 2) continue + + total++ + + usr << "Active Players: [total]" \ No newline at end of file