Skip to content

Commit

Permalink
Improves runtime info during admin proc calls (ParadiseSS13#28279)
Browse files Browse the repository at this point in the history
  • Loading branch information
Contrabang authored Feb 8, 2025
1 parent 36139a6 commit 5d32c2f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions code/modules/admin/verbs/debug.dm
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
CRASH("WrapAdminProcCall with no ckey: [target] [procname] [english_list(arguments)]")
if(current_caller && current_caller != ckey)
if(!GLOB.AdminProcCallSpamPrevention[ckey])
to_chat(usr, "<span class='adminnotice'>Another set of admin called procs are still running, your proc will be run after theirs finish.</span>")
to_chat(usr, "<span class='userdanger'>Another set of admin called procs are still running, your proc will be run after theirs finish.</span>")
GLOB.AdminProcCallSpamPrevention[ckey] = TRUE
UNTIL(!GLOB.AdminProcCaller)
to_chat(usr, "<span class='adminnotice'>Running your proc</span>")
to_chat(usr, "<span class='userdanger'>Running your proc</span>")
GLOB.AdminProcCallSpamPrevention -= ckey
else
UNTIL(!GLOB.AdminProcCaller)
Expand All @@ -135,8 +135,8 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
++GLOB.AdminProcCallCount
try
. = world.WrapAdminProcCall(target, procname, arguments)
catch
to_chat(usr, "<span class='adminnotice'>Your proc call failed to execute, likely from runtimes. You <i>should</i> be out of safety mode. If not, god help you.</span>")
catch(var/exception/e)
to_chat(usr, "<span class='userdanger'>Your proc call failed to execute, likely from runtimes. You <i>should</i> be out of safety mode. If not, god help you. Runtime Info: [e.file]:[e.line]: [e.name]</span>")

if(--GLOB.AdminProcCallCount == 0)
GLOB.AdminProcCaller = null
Expand Down

0 comments on commit 5d32c2f

Please sign in to comment.