X-Git-Url: https://mudpy.org/gitweb?a=blobdiff_plain;f=mudpy%2Fcommand.py;h=250fb6f1516bb5392c37743f0d9084f7e2740d3f;hb=5576b96f9280d8b9598d4b4806a016854b6a1c65;hp=ebd9036983b8178a0f3d9a7ef71840b811446c46;hpb=b64bdabe02e5d30113df5052050cfb9b62683a74;p=mudpy.git diff --git a/mudpy/command.py b/mudpy/command.py index ebd9036..250fb6f 100644 --- a/mudpy/command.py +++ b/mudpy/command.py @@ -148,10 +148,7 @@ def help(actor, parameters): if parameters and actor.owner: # is the command word one for which we have data? - if parameters in actor.universe.groups["command"]: - command = actor.universe.groups["command"][parameters] - else: - command = None + command = mudpy.misc.find_command(parameters) # only for allowed commands if actor.can_run(command): @@ -164,7 +161,8 @@ def help(actor, parameters): output = "$(red)" else: output = "$(grn)" - output += parameters + "$(nrm) - " + description + "$(eol)$(eol)" + output = "%s%s$(nrm) - %s$(eol)$(eol)" % ( + output, command.subkey, description) # add the help text if provided help_text = command.get("help") @@ -237,6 +235,10 @@ def move(actor, parameters): def preferences(actor, parameters): """List, view and change actor preferences.""" + + # Escape replacement macros in preferences + parameters = mudpy.misc.escape_macros(parameters) + message = "" arguments = parameters.split() allowed_prefs = set()