modbot/mods/default.py

14 lines
397 B
Python
Raw Normal View History

2021-08-02 20:57:16 -05:00
import utils
2021-08-02 20:43:02 -05:00
def cmd(line, srv):
command, params = utils.cmdparse(line)
2021-08-02 20:43:02 -05:00
if command == "load":
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] + "'")