From 1045d0fabff311df2154c7135ea7c5e905ed2f0e Mon Sep 17 00:00:00 2001 From: Greg Taylor Date: Tue, 20 Jan 2009 04:18:03 +0000 Subject: [PATCH] Restore the single-character aliases for say, pose, and pose without spaces. Also add 'p' as an alias for page in initial_data.py as per MUX. --- src/cmdhandler.py | 16 ++++++++++++++++ src/initial_setup.py | 1 + 2 files changed, 17 insertions(+) diff --git a/src/cmdhandler.py b/src/cmdhandler.py index 984fe1b891..219284bad3 100755 --- a/src/cmdhandler.py +++ b/src/cmdhandler.py @@ -181,6 +181,22 @@ def match_alias(command): command.command_string, command.command_string) + # 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_string = "say" + # Shortened pose alias. + elif first_char == ':': + command.command_argument = command.command_string[1:] + command.command_string = "pose" + # Pose without space alias. + elif first_char == ';': + command.command_argument = command.command_string[1:] + command.command_string = "pose" + command.command_switches.insert(0, "nospace") + def match_channel(command): """ Match against a comsys channel or comsys command. If the player is talking diff --git a/src/initial_setup.py b/src/initial_setup.py index 7227c26432..556cc85153 100644 --- a/src/initial_setup.py +++ b/src/initial_setup.py @@ -101,6 +101,7 @@ def create_aliases(): CommandAlias(user_input="ex", equiv_command="examine").save() CommandAlias(user_input="sa", equiv_command="say").save() CommandAlias(user_input="emote", equiv_command="pose").save() + CommandAlias(user_input="p", equiv_command="page").save() def import_help_files(): """