Added a @reload command to reload most of the modules. This currently only seems to work for the stuff outside of the apps directory, and doesn't include the server, session_mgr, or events modules, as they have variables in them that we can't have reset. So basically, changes to the functions_ and commands_ modules can be applied with @reload, but little else. Hopefully this will improve with time. Also fixed a bug with @name'ing players but not updating their account's username to reflect it.

This commit is contained in:
Greg Taylor 2007-04-30 17:51:55 +00:00
parent 81b1797144
commit 4fd5a20e2c
6 changed files with 50 additions and 11 deletions

View file

@ -16,13 +16,22 @@ def cmd_check_num_args(session, arg_list, min_args, errortext="Missing arguments
return False
return True
def print_errmsg(errormsg):
def log_errmsg(errormsg):
"""
Prints/logs an error message. Pipe any errors to be logged through here.
For now we're just printing to standard out.
Prints/logs an error message to the server log.
errormsg: (string) The message to be logged.
"""
print 'ERROR: %s' % (errormsg,)
def log_infomsg(infomsg):
"""
Prints any generic debugging/informative info that should appear in the log.
debugmsg: (string) The message to be logged.
"""
print '%s' % (infomsg,)
def command_list():
"""
Return a list of all commands.