Compare commits

...

1 Commits

Author SHA1 Message Date
Jordan Brown c15545c4ac
Don't throttle TGS commands 1 year ago
  1. 10
      code/modules/admin/chat_commands.dm

10
code/modules/admin/chat_commands.dm

@ -4,13 +4,8 @@
name = "status"
help_text = "Gets the admincount, playercount, gamemode, and true game mode of the server"
admin_only = TRUE
var/last_tgs_status = 0
/datum/tgs_chat_command/tgsstatus/Run(datum/tgs_chat_user/sender, params)
var/rtod = REALTIMEOFDAY
if(rtod - last_tgs_status < TGS_STATUS_THROTTLE)
return
last_tgs_status = rtod
var/list/adm = get_admin_counts()
var/list/allmins = adm["total"]
var/status = "Admins: [allmins.len] (Active: [english_list(adm["present"])] AFK: [english_list(adm["afk"])] Stealth: [english_list(adm["stealth"])] Skipped: [english_list(adm["noflags"])]). "
@ -20,13 +15,8 @@
/datum/tgs_chat_command/tgscheck
name = "check"
help_text = "Gets the playercount, gamemode, and address of the server"
var/last_tgs_check = 0
/datum/tgs_chat_command/tgscheck/Run(datum/tgs_chat_user/sender, params)
var/rtod = REALTIMEOFDAY
if(rtod - last_tgs_check < TGS_STATUS_THROTTLE)
return
last_tgs_check = rtod
var/server = CONFIG_GET(string/server)
return "[GLOB.round_id ? "Round #[GLOB.round_id]: " : ""][GLOB.clients.len] players on [SSmapping.config.map_name], Mode: [GLOB.master_mode]; Round [SSticker.HasRoundStarted() ? (SSticker.IsRoundInProgress() ? "Active" : "Finishing") : "Starting"] -- [server ? server : "[world.internet_address]:[world.port]"]"

Loading…
Cancel
Save