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

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Plugins
. . -> [Subject]  Window plugin problem

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Window plugin problem

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Kazu   (3 posts)  [Biography] bio
Date Mon 23 Jan 2012 11:10 PM (UTC)  quote  ]

Amended on Mon 23 Jan 2012 11:16 PM (UTC) by Kazu

Message
So I'm trying to set up a window to pull a certain channel of chat to a blank world set up beside my main one using Nick's chat redirect plugin, but I keep getting an error on the line with the regex line. Here's the trigger portion where they are.

<triggers>

<trigger
enabled="y"
match="^\(Party\)\: (.+?) says\, \"(.*?)\"$"
omit_from_output="y"
regexp="y"
script="redirect"
sequence="100"
>
</trigger>

<trigger
enabled="y"
match="^\(Party\)\: You say\, \"(.*?)\"$"
omit_from_output="y"
regexp="y"
script="redirect"
sequence="100"
>
</trigger>

</triggers>

It's supposed to match:

(Party): Person says, "something"
(Party): You say, "something"

If anyone could point out what I'm doing wrong, I will be very appreciative.
[Go to top] top

Posted by Twisol   USA  (2,229 posts)  [Biography] bio
Date Reply #1 on Tue 24 Jan 2012 04:51 PM (UTC)  quote  ]

Amended on Tue 24 Jan 2012 04:54 PM (UTC) by Twisol

Message
You should use &quot; instead of a literal ". If you look at the XML, you have match="<stuff>", right? The content is between two double-quotes. But if you add a double-quote inside, it thinks that's where the content ends (i.e. match="foo"bar"). So XML provides a special sequence that lets you embed a double-quote (and other characters) without mucking up the syntax, and that's &quot;. (Begins with the &, ends with a ;, don't include that period.)

"^\(Party\): (.+?) says, &quot;(.*?)&quot;$"
"^\(Party\): You say, &quot;(.*?)&quot;$"


I should mention that this only applies if you're tinkering with the XML format yourself. When you use the trigger/alias dialog from within MUSHclient, you don't have to worry about this.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[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.


735 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

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

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]