Umm. Well, you could turn on MXP, and assuming you also test for case where it can fail, like, "<<This is my room>>", and such, and do replacement of the "<" with < on the raw data, you could then process the line and then send it back through the rest of the triggers using "world.simulate". However, since I think simulate will also cause the line to go through packet interception too, you may need to "tag" it with some sort of nonsense code, like adding esc[99q to the start of each line. The ansi parser should simply throw it out, when it finally does display it, but you can check for the invalid code to determine it this is a packet you have "handled", or one you need to make changes in.
It would have been a damn sight easier if we had simulate from the start and some way to tell the regexp processor in triggers to simply let us also match the ansi code sequences and even MXP tags. Then all it would have taken was a trigger like: "If you don't see <my line tag> and .*", then call the process script.", while everything else would just need to add: "If you *do* see <my line tag> and 'blah...'". Though, that would wreck havoc with plugins, which wouldn't know the difference, so we are probably better off with things as they are, even if it is quite a bit more complicated. lol |