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:
parent
ba5f89d03c
commit
53e30520b8
@ -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):
|
||||
"""<code>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user