mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 21:19:31 +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:
|
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):
|
||||||
|
Loading…
Reference in New Issue
Block a user