2021-08-02 20:57:16 -05:00
|
|
|
import utils
|
|
|
|
|
2021-08-02 20:43:02 -05:00
|
|
|
def cmd(line, srv):
|
2021-08-02 21:54:49 -05:00
|
|
|
command, params = utils.cmdparse(line)
|
2021-08-02 20:43:02 -05:00
|
|
|
if command == "load":
|
2021-08-02 21:54:49 -05:00
|
|
|
try:
|
|
|
|
srv.load_mod(params[0])
|
|
|
|
except ModuleNotFoundError:
|
|
|
|
utils.message(srv, line.params[0],
|
|
|
|
"failed to load `" + params[0] + "'")
|
|
|
|
else:
|
|
|
|
utils.message(srv, line.params[0],
|
|
|
|
"loaded: `" + params[0] + "'")
|