You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
576 B
Python

class ExecCommand:
def __init__(self, *args):
self.exec(*args)
def exec(
self, addr, authed, data, obj, spl, success, failure, info, incUsage, length
):
if authed:
if length > 1:
try:
rtrn = exec(" ".join(spl[1:]))
except Exception as err:
failure(str(err))
return
info(str(rtrn))
return
else:
incUsage("exec")
return
else:
incUsage(None)