Moved files to subdirectory
This commit is contained in:
26
legacy/commands/loadmod.py
Normal file
26
legacy/commands/loadmod.py
Normal file
@@ -0,0 +1,26 @@
|
||||
from utils.loaders.single_loader import loadSingle
|
||||
|
||||
|
||||
class LoadmodCommand:
|
||||
def __init__(self, *args):
|
||||
self.loadmod(*args)
|
||||
|
||||
def loadmod(self, addr, authed, data, obj, spl, success, failure, info, incUsage, length):
|
||||
if authed:
|
||||
if length == 2:
|
||||
rtrn = loadSingle(spl[1])
|
||||
if rtrn is True:
|
||||
success("Loaded module: %s" % spl[1])
|
||||
return
|
||||
elif rtrn == "RELOAD":
|
||||
success("Reloaded module: %s" % spl[1])
|
||||
return
|
||||
else:
|
||||
failure("Error loading module %s: %s" % (spl[1], rtrn))
|
||||
return
|
||||
else:
|
||||
incUsage("loadmod")
|
||||
return
|
||||
else:
|
||||
incUsage(None)
|
||||
return
|
||||
Reference in New Issue
Block a user