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:
parent
55a5d08378
commit
d8b562865d
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user