Command reloading ended up being really super easy. @reload now rebuilds and re-imports all of the command modules. This should make development a lot easier.

This commit is contained in:
Greg Taylor 2009-01-27 16:16:43 +00:00
parent 4ca5a4a7bf
commit 5c5d2249bd
3 changed files with 32 additions and 22 deletions

View file

@ -68,7 +68,9 @@ def cmd_list(command):
if not command.command_argument:
source_object.emit_to(msg_invalid)
elif command.command_argument == "commands":
source_object.emit_to('Commands: '+ ' '.join(server.command_list()))
clist = GLOBAL_CMD_TABLE.ctable.keys()
clist.sort()
source_object.emit_to('Commands: '+ ' '.join(clist))
elif command.command_argument == "process":
if not functions_general.host_os_is('nt'):
loadvg = os.getloadavg()