From d8b562865d0588ae5dbc30d535b18f0ab9b227e5 Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 19 Jun 2015 10:44:25 -0700 Subject: [PATCH] plugins/admin.py: this is an exec command, not eval --- plugins/admin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/admin.py b/plugins/admin.py index 6791dca..3a2e32b 100644 --- a/plugins/admin.py +++ b/plugins/admin.py @@ -10,14 +10,14 @@ def checkauthenticated(irc, source): if not irc.users[source].identified: raise NotAuthenticatedError("You are not authenticated!") -@utils.add_cmd -def eval(irc, source, args): +def _exec(irc, source, args): checkauthenticated(irc, source) args = ' '.join(args) if not args.strip(): utils.msg(irc, source, 'No code entered!') return - exec(args) + exec(args, globals(), locals()) +utils.add_cmd(_exec, 'exec') @utils.add_cmd def spawnclient(irc, source, args):