From 53e30520b839f1f0e69e7d435dff252f4c37105c Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 4 Jun 2021 17:45:33 -0700 Subject: [PATCH] Guard exec plugin behind a config option --- plugins/exec.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/exec.py b/plugins/exec.py index e3822be..a588ea3 100644 --- a/plugins/exec.py +++ b/plugins/exec.py @@ -6,7 +6,7 @@ import pprint # easier to access through eval and exec. import threading -from pylinkirc import utils, world +from pylinkirc import utils, world, conf from pylinkirc.coremods import permissions from pylinkirc.log import log @@ -14,6 +14,9 @@ exec_locals_dict = {} PPRINT_MAX_LINES = 20 PPRINT_WIDTH = 200 +if not conf.conf['pylink'].get("debug_enabled", False): + raise RuntimeError("pylink::debug_enabled must be enabled to load this plugin") + def _exec(irc, source, args, locals_dict=None): """