@verb #8045:"@alias" any any any rdo #8045 @program #8045:"@alias" any any any "Copied from Lao-Tzu (#8084):@alias Mar 10 17:55:15 1998" "Verb syntax:" " @alias = Creates an alias." " @alias - Deletes an alias." " @alias Lists all aliases." player != this && raise(E_PERM, "Interesting.") if (!argstr) if (!this.cmd_aliases) player:sub_tell("You have no command aliases.") player:tell($help_utils:verb_documentation(this, verb)) else player:tellColumns({20, 50}, {"Command", "Alias"}, @this.cmd_aliases) endif return endif if (!index(argstr, "=") && argstr[1] == "-") command = argstr[2..$] if (!listiassoc(command, this.cmd_aliases)) return player:sub_tell("You can't remove the alias \"%1\", because it doesn't exist. Type '@alias' for a list of all your current aliases.", command) endif player:sub_tell("Are you sure you want to remove the alias \"%1\"?", command) !$cmd_utils:yes_or_no() && {player:tell("Not removing it."), kill_task(task_id())} this.cmd_aliases = listdelete(this.cmd_aliases, listiassoc(command, this.cmd_aliases)) return player:sub_tell("Alias deleted.") endif try {command, alias} = $su:explode(argstr, "=") except (E_ARGS) return player:tell("Proper format: @alias =, where 'command' is what you type, and 'alias' is what the MOO will replace it with.") endtry if (q = listiassoc(command, this.cmd_aliases)) player:sub_tell("\"%1\", which was previously aliased to \"%2\", now changed to \"%3\".", command, this.cmd_aliases[q][2], alias) this.cmd_aliases[q][2] = alias else player:sub_tell("\"%1\" will now be replaced with \"%2\" when \"%1\" is the first section of a command.", command, alias) this.cmd_aliases = {@this.cmd_aliases, {command, alias}} endif "Last modified by Dax (#789) on Tue Jun 2 17:09:49 1998 EDT." .