3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-24 11:42:51 +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:
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):