Window plugin problem

Posted by Kazu on Mon 23 Jan 2012 11:10 PM — 2 posts, 14,869 views.

#0
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.
Amended on Mon 23 Jan 2012 11:16 PM by Kazu
USA #1
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.