Hmm...
Aardwolf doesn't use MXP. Would that make some of these concerns go away?
So here's the much longer version of my question...
I have a plugin that reads text from the mud in the form of
Quote:
{chan ch=gtell}(Group) Ol' Dirty Fiendish: 'hmm pizza'
It does omit-from-output, then uses the following code to strip off the initial {...} part and then re-display the result as a series of ColourTells to simulate as if the {...} part had never been there.
-- strip out the tag
tag_length = string.find(styles[1].text,"}")
styles[1].text = string.sub(styles[1].text, tag_length+1)
styles[1].length = styles[1].length-tag_length
-- display
for _, v in ipairs (styles) do
ColourTell (RGBColourToName (v.textcolour),RGBColourToName (v.backcolour),v.text)
end -- for each style run
Note ("") -- wrap up line
The result is
Quote:
(Group) Ol' Dirty Fiendish: 'hmm pizza'
So far so good. Except now I'm trying to convert zMUD users, and one of the first things they ask is "How do I do #sub in MUSHclient?" And my response usually involves a lot of "well..." and "that's actually rather complicated". So I figured, since I'm such a smart guy, I can write a magic alias that would turn "#sub {*} {*}" into a new trigger, in a way similar to the #trigger and #alias aliases that have been discussed before on the forums*, with the proper code to actually achieve a style of inline substitution whereby all instances of %1 in the mud output are replaced with %2. And I can do it, no problem...except...
Now I'm in a situation where I need (at least) two different scripts modifying the same lines from the MUD, and I need them both to preserve color codes, and that doesn't seem possible unless I change all of that ColourTell stuff to Simulate instead.
* - (if you don't remember the relevant forum threads, see https://code.google.com/p/aardwolfclientpackage/wiki/CommandLineAliasesAndTriggers for my writeup for users on those two aliases)
When the user types
#sub {hello} {pizza}
#sub {friend} {pie}
they will get two triggers that SHOULD cause the line
Quote:
{chan ch=gtell}(Group) Ol' Dirty Fiendish: 'hello friend'
to be replaced, in concert with the plugin above, with
Quote:
(Group) Ol' Dirty Fiendish: 'pizza pie'
That seems not possible without Simulate. Issues of where to put color breaks for complicated coloring are unimportant right now.
Also, keeping these triggers out of a plugin is kind of important to me for this project, so even if there weren't another plugin involved fancy plugin-specific tricks would probably be a last resort. :\