| Message |
All you need to do is amend the alias to "send to execute", which makes the individual alias items be re-evaluated by the MUSHclient command processor. Like this:
<aliases>
<alias
match="^\#alias \{(?P<match>[A-Za-z]+)\} \{(?P<send>.+)\}$"
enabled="y"
regexp="y"
send_to="12"
sequence="100"
>
<send>do
local result =
AddAlias ("%<match>", "^%<match>(?P<target> [A-Za-z]{1,}){0,1}$",
"%<send>%%<target>",
alias_flag.Enabled +
alias_flag.RegularExpression +
alias_flag.Replace,
"")
if result ~= error_code.eOK then
ColourNote ("white", "red", error_desc [result])
else
ColourNote ("white", "green",
"Alias '%<match>' added which sends '%<send>'")
SetAliasOption ("%<match>", "send_to", "10")
end -- if
end -- do</send>
</alias>
</aliases>
However I notice when trying it, that whilst the above works, if you use an argument it gets tacked onto the end, eg.
blinloth nick
--> sends:
linw
wlinmid
wmidpel
wpelosg
wosgroi
wroimid
wmidloth
wloth nick
See what I mean? The "nick" is only on the last one. However if you just do blinloth on its own it will be OK.
You could work around that, but I am just pointing it out, as what the current behaviour will be. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|