diff --git a/plugins/exec.py b/plugins/exec.py index a588ea3..2e85beb 100644 --- a/plugins/exec.py +++ b/plugins/exec.py @@ -15,7 +15,9 @@ 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") + raise RuntimeError("pylink::debug_enabled must be enabled to load this plugin. " + "This should ONLY be used in test environments for debugging and development, " + "as anyone with access to this plugin's commands can run arbitrary code as the PyLink user!") def _exec(irc, source, args, locals_dict=None): """ diff --git a/plugins/raw.py b/plugins/raw.py index b3b0590..0128163 100644 --- a/plugins/raw.py +++ b/plugins/raw.py @@ -4,7 +4,7 @@ raw.py: Provides a 'raw' command for sending raw text to IRC. from pylinkirc import utils from pylinkirc.coremods import permissions from pylinkirc.log import log - +from pylinkirc import conf @utils.add_cmd def raw(irc, source, args): @@ -18,8 +18,9 @@ def raw(irc, source, args): if irc.protoname == 'clientbot': # exec.raw is included for backwards compatibility with PyLink 1.x perms = ['raw.raw', 'exec.raw'] - else: - perms = ['raw.raw.unsupported_network'] + elif not conf.conf['pylink'].get("raw_enabled", False): + raise RuntimeError("Raw commands are not supported on this protocol") + permissions.check_permissions(irc, source, perms) args = ' '.join(args)