3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-24 19:52:53 +01:00

Guard exec plugin behind a config option

This commit is contained in:
James Lu 2021-06-04 17:45:33 -07:00
parent ba5f89d03c
commit 53e30520b8

View File

@ -6,7 +6,7 @@ import pprint
# easier to access through eval and exec. # easier to access through eval and exec.
import threading import threading
from pylinkirc import utils, world from pylinkirc import utils, world, conf
from pylinkirc.coremods import permissions from pylinkirc.coremods import permissions
from pylinkirc.log import log from pylinkirc.log import log
@ -14,6 +14,9 @@ exec_locals_dict = {}
PPRINT_MAX_LINES = 20 PPRINT_MAX_LINES = 20
PPRINT_WIDTH = 200 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): def _exec(irc, source, args, locals_dict=None):
"""<code> """<code>