From 6c8d01a784666c559b7817404851406a79e295de Mon Sep 17 00:00:00 2001 From: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Date: Wed, 14 Oct 2020 19:49:30 +0100 Subject: [PATCH] Fixes admins getting stuck in proc security hell (#14607) * Fixes admins getting stuck in proc security hell * Forgot to remove my test --- code/modules/admin/verbs/debug.dm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index d2c05ff4f6c..3069398f738 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -145,7 +145,11 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention) GLOB.LastAdminCalledTargetUID = target.UID() GLOB.AdminProcCaller = ckey //if this runtimes, too bad for you ++GLOB.AdminProcCallCount - . = world.WrapAdminProcCall(target, procname, arguments) + try + . = world.WrapAdminProcCall(target, procname, arguments) + catch + to_chat(usr, "Your proc call failed to execute, likely from runtimes. You should be out of safety mode. If not, god help you.") + if(--GLOB.AdminProcCallCount == 0) GLOB.AdminProcCaller = null