3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-28 05:29:25 +01:00

plugins/admin.py: this is an exec command, not eval

This commit is contained in:
James Lu 2015-06-19 10:44:25 -07:00
parent 55a5d08378
commit d8b562865d

View File

@ -10,14 +10,14 @@ def checkauthenticated(irc, source):
if not irc.users[source].identified: if not irc.users[source].identified:
raise NotAuthenticatedError("You are not authenticated!") raise NotAuthenticatedError("You are not authenticated!")
@utils.add_cmd def _exec(irc, source, args):
def eval(irc, source, args):
checkauthenticated(irc, source) checkauthenticated(irc, source)
args = ' '.join(args) args = ' '.join(args)
if not args.strip(): if not args.strip():
utils.msg(irc, source, 'No code entered!') utils.msg(irc, source, 'No code entered!')
return return
exec(args) exec(args, globals(), locals())
utils.add_cmd(_exec, 'exec')
@utils.add_cmd @utils.add_cmd
def spawnclient(irc, source, args): def spawnclient(irc, source, args):