Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, 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.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ Chat redirect match problem
Chat redirect match problem
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Boen310
(17 posts) Bio
|
Date
| Fri 17 Aug 2018 03:22 PM (UTC) |
Message
| Hello,
I currently use a chat redirect and trying to apply it to a new mud. I am unable to match the pattern to pick up the chat I want to redirect. The chat patterns are :
[NewbiE] Roen: 'test'
[OOC] Roen: -- 'test'
I am trying to match on [NewbiE] and [OOC]
<trigger
enabled="y"
match="%OOC% + '.*'$"
regexp="y"
script="redirect"
sequence="100"
>
</trigger>
<trigger
enabled="y"
match="%NewbiE% + '.*'$"
regexp="y"
script="redirect"
sequence="100"
>
</trigger>
Any help be greatly appreciated. | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #1 on Fri 17 Aug 2018 08:51 PM (UTC) Amended on Sat 18 Aug 2018 07:21 AM (UTC) by Nick Gammon
|
Message
| This has no way of matching on what you are trying to:
If you are trying to match square brackets, you need to use square brackets, however "escape" them with a backslash because they have a special meaning otherwise. More like this:
More simply, don't use regular expressions and just use a normal wildcard:
 |
Regular expressions
- Regular expressions (as used in triggers and aliases) are documented on the Regular expression tips forum page.
- Also see how Lua string matching patterns work, as documented on the Lua string.find page.
|
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Boen310
(17 posts) Bio
|
Date
| Reply #2 on Sat 18 Aug 2018 10:17 AM (UTC) |
Message
| Thank you seems to work but get this message now when loading it.
Can't open chat world file: C:\Program Files (x86)\MUSHclient\worlds\DB Chat.mcl
Reinstalled plugin Chat_Redirector (cb84a526b476f69f403517da)
and this is what chat_world
chat_world = "DB Chat"
local first_time = true
and my Chat window is saved as DB Chat.mcl | Top |
|
Posted by
| Boen310
(17 posts) Bio
|
Date
| Reply #3 on Sat 18 Aug 2018 10:39 AM (UTC) Amended on Sat 18 Aug 2018 10:43 AM (UTC) by Boen310
|
Message
| Got it somehow a previous saved .MCL had the same name. Maybe created when I was trying to set this up.
Also using this match- match="[OOC]*" was redirecting all to chat window.
When I used match="^\[OOC\].*" it worked good.
Thank you | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #4 on Sat 18 Aug 2018 09:32 PM (UTC) |
Message
| These days it is easier to use the miniwindows version of the chat plugin. I think the latest version is here:
http://www.gammon.com.au/forum/?id=10728
As for the match, the second suggestion I made was not a regular expression, so you need to turn that off:
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | 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.
15,473 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top