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.
27 lines
825 B
Python
27 lines
825 B
Python
7 years ago
|
from utils.loaders.single_loader import loadSingle
|
||
|
|
||
2 years ago
|
|
||
5 years ago
|
class LoadmodCommand:
|
||
6 years ago
|
def __init__(self, *args):
|
||
|
self.loadmod(*args)
|
||
7 years ago
|
|
||
2 years ago
|
def loadmod(self, addr, authed, data, obj, spl, success, failure, info, incUsage, length):
|
||
7 years ago
|
if authed:
|
||
|
if length == 2:
|
||
6 years ago
|
rtrn = loadSingle(spl[1])
|
||
2 years ago
|
if rtrn is True:
|
||
6 years ago
|
success("Loaded module: %s" % spl[1])
|
||
|
return
|
||
|
elif rtrn == "RELOAD":
|
||
|
success("Reloaded module: %s" % spl[1])
|
||
7 years ago
|
return
|
||
|
else:
|
||
|
failure("Error loading module %s: %s" % (spl[1], rtrn))
|
||
|
return
|
||
|
else:
|
||
|
incUsage("loadmod")
|
||
|
return
|
||
|
else:
|
||
|
incUsage(None)
|
||
|
return
|