Revamp how commands are loaded. This will now allow for easy addition of custom commands and over-riding existing Evennia-supplied commands.

This commit is contained in:
Greg Taylor 2009-01-27 15:21:15 +00:00
parent 848c7da075
commit 4ca5a4a7bf
12 changed files with 165 additions and 107 deletions

View file

@ -2,6 +2,7 @@
Contains commands for managing script parents.
"""
from src import scripthandler
from src.cmdtable import GLOBAL_CMD_TABLE
def clear_cached_scripts(command):
"""
@ -42,4 +43,6 @@ def cmd_parent(command):
clear_cached_scripts(command)
return
command.source_object.emit_to("Must be specified with one of the following switches: showcache, clearcache")
command.source_object.emit_to("Must be specified with one of the following switches: showcache, clearcache")
GLOBAL_CMD_TABLE.add_command("@parent", cmd_parent,
priv_tuple=("genperms.builder")),