[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Tips and tricks
. . -> [Subject]  Expanding variable groups in alias as regular expression

Expanding variable groups in alias as regular expression

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by ErockMahan   (81 posts)  [Biography] bio
Date Tue 06 Jul 2010 02:29 PM (UTC)
Message
A recent update allowed triggers to pull from a variable list seperated by | indicators by using (@!list), but I don't see that it works with an alias as well. That is:

<aliases>
<alias
match="^Test (@!item)$"
enabled="y"
expand_variables="y"
regexp="y"
send_to="12"
sequence="100"
>
<send>world.note "matched item"</send>
</alias>
</aliases>

won't work but this will:

<triggers>
<trigger
enabled="y"
expand_variables="y"
keep_evaluating="y"
match="^You get (@!item)$"
regexp="y"
send_to="12"
sequence="100"
>
<send>world.note "matched item"</send>
</trigger>
</triggers>

Has this not been implemented, or am I missing something?
[Go to top] top

Posted by Twisol   USA  (2,257 posts)  [Biography] bio
Date Reply #1 on Tue 06 Jul 2010 08:11 PM (UTC)
Message
ErockMahan said:
Has this not been implemented, or am I missing something?


I've come across this too, and my guess is that it just hasn't been implemented in aliases.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Nick Gammon   Australia  (23,042 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Tue 06 Jul 2010 09:44 PM (UTC)
Message
It hasn't been implemented in aliases. I think the reason was that for triggers, you may need to match many things (eg. colour the names of any of 1000 friends). However for aliases, you are less likely to be needing to do this.

A work-around for aliases is just to have something like "test *" and then in a script see if the wildcard matches a list of names. After all, aliases don't colour lines like triggers do.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


11,308 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]