Alias to Make Aliases

Posted by Neves on Sat 25 Sep 2010 09:48 PM — 6 posts, 25,794 views.

USA #0
I am trying to use the alias to make aliases, but I cannot find where the new alias I created is stored if I want to later remove it, where can I find it?

-Neves
Australia Forum Administrator #1
Template:faq=29
Please read the MUSHclient FAQ - point 29.


There have been some posts about aliases that make aliases (eg. for converting from another client).

If the alias is in the main world file, then the new aliases will be there too. If in a plugin, the aliases will be in the plugin. Note that aliases created inside plugins are not saved (the plugin is shared between worlds - only its variables are saved).

If you type: /Debug "summary"

you should see all your aliases, both in plugins and in the main script file, like this:


-- Triggers, aliases, timers, variables --
** Triggers: 2 in world file, triggers enabled: yes. [Triggers]
   2 enabled, 2 regexp, 88 attempts, 0 matched, 0.000973 seconds.
** Aliases: 3 in world file, aliases enabled: yes. [Aliases]
   2 enabled, 0 regexp, 2 attempts, 0 matched, 0.000008 seconds.
** Timers: 1 in world file, timers enabled: yes. [Timers]
   1 enabled, 0 fired.
   Timers checked every 0.1 seconds.
** Variables: 12. [Variables]
-- MCCP --
MCCP active, took 0.000035 seconds to decompress
MCCP received 240 compressed bytes, decompressed to 327 bytes.
MCCP compression ratio was:   73.4% (lower is better)
-- Plugins (Processing order) --
ID: 71a90acddb14f784437b8b80, 'Summary',  Enabled [Al]
ID: 87a0ec3649ab9a04d5ea618d, 'Omit_Blank_Lines',  Enabled [Tr]
ID: 84f927265b7fed69c7ada8be, 'Stopwatch',  Enabled [Al Ti Va Cb]
ID: 9c16895687a6b24f6202ac0c, 'Trace_Window',  Enabled [Cb]
ID: 6069eacf376f5e9dbfce901f, 'Mapper_Telnet',  Enabled [Al Va Cb]
ID: 03ca99c4e98d2a3e6d655c7d, 'Chat',  Enabled [Al Cb]
ID: edb75e5e80221bfb1a83a234, 'Config_Option_Changer',  Enabled [Al]
ID: 559d05b18c3fd5602a433cf8, 'Timestamps',  Enabled [Cb]
** Plugins: 8 loaded, 8 enabled.


The aliases are the [Aliases] and [Al] parts - you can click on those hyperlinks to see the list of actual aliases.

I'm not sure this is the most efficient workflow, but a plugin could conceivably create aliases, and then use ExportXML to "serialize" them into variables, and then ImportXML to import them back next time, if you really wanted to have plugin aliases be created on-the-fly and available next time. There might be easier ways.
Amended on Sat 25 Sep 2010 10:04 PM by Nick Gammon
USA #2
I use the alias in:
http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=9705

The problem is if I want to change the alias reusing the command only makes another alias, is there a way to make an alias to remove aliases like #unalias, and is there a way to make the alias command replace an old alias with a similar match pattern?

-Neves
Australia Forum Administrator #3
If I recall correctly, as long as you give the alias a name, then addxml will replace it.
USA #4
Is there a remove alias command just to remove one I no longer want?
(also, the forum isn't sending me e-mails to posts I subscribed to)
Australia Forum Administrator #5
Your mail bounced. When that happens I flag the account to stop trying to send it:


Remote host said: 554 delivery error: dd Sorry your message to <your email> cannot be delivered. This account has been disabled or discontinued [#102]. - mta1078.mail.sk1.yahoo.com



Template:function=DeleteAlias
DeleteAlias

The documentation for the DeleteAlias script function is available online. It is also in the MUSHclient help file.