mirror of
https://github.com/evennia/evennia.git
synced 2026-03-27 10:16:32 +01:00
Fix pose/say single character aliases.
This commit is contained in:
parent
ee94da4bd8
commit
1bbffe99a8
1 changed files with 12 additions and 3 deletions
|
|
@ -193,23 +193,32 @@ def match_alias(command):
|
|||
exist on the dict, just keep the command_string the same. If the key exists,
|
||||
its value replaces the command_string. For example, sa -> say.
|
||||
"""
|
||||
# See if there's an entry in the global alias table.
|
||||
command.command_string = alias_mgr.CMD_ALIAS_LIST.get(
|
||||
command.command_string,
|
||||
command.command_string)
|
||||
|
||||
def get_aliased_message():
|
||||
"""
|
||||
Convenience sub-function to combine the lopped off command string
|
||||
and arguments for posing, saying, and nospace posing aliases.
|
||||
"""
|
||||
return "%s %s" % (command.command_string[1:],
|
||||
command.command_argument)
|
||||
|
||||
# Match against the single-character aliases of MUX/MUSH-dom.
|
||||
first_char = command.command_string[0]
|
||||
# Shortened say alias.
|
||||
if first_char == '"':
|
||||
command.command_argument = command.command_string[1:]
|
||||
command.command_argument = get_aliased_message()
|
||||
command.command_string = "say"
|
||||
# Shortened pose alias.
|
||||
elif first_char == ':':
|
||||
command.command_argument = command.command_string[1:]
|
||||
command.command_argument = get_aliased_message()
|
||||
command.command_string = "pose"
|
||||
# Pose without space alias.
|
||||
elif first_char == ';':
|
||||
command.command_argument = command.command_string[1:]
|
||||
command.command_argument = get_aliased_message()
|
||||
command.command_string = "pose"
|
||||
command.command_switches.insert(0, "nospace")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue