There is a standard way of showing the line in its original colours, and that is to echo back each style, like this:
In a script file:
function showLine (name, line, wildcards, styles)
if someCondition then
-- do whatever
return
end -- if
-- show original line
for _, v in ipairs (styles) do
ColourTell (RGBColourToName (v.textcolour), RGBColourToName (v.backcolour), v.text)
end -- for
Note () -- finish line off
end -- showLine
In a trigger with "send to script (after omit)":
if someCondition then
-- do whatever
return
end -- if
-- show original line
for _, v in ipairs (TriggerStyleRuns) do
ColourTell (RGBColourToName (v.textcolour), RGBColourToName (v.backcolour), v.text)
end -- for
Note () -- finish line off
Example trigger
<triggers>
<trigger
enabled="y"
match="foo"
omit_from_output="y"
regexp="y"
send_to="14"
sequence="100"
>
<send>
if someCondition then
-- do whatever
return
end -- if
-- show original line
for _, v in ipairs (TriggerStyleRuns) do
ColourTell (RGBColourToName (v.textcolour), RGBColourToName (v.backcolour), v.text)
end -- for
Note () -- finish line off
</send>
</trigger>
</triggers>
Quote:
Also, it seems once the trigger omitted it, the line it puts back to the world with ColourNote is not picked up by other triggers, is there a way to change that?
Well not really directly, because a noted line is not checked for triggers. Can't you make the other triggers match on the original, unaltered, line?
I think Fiendish had some sort of fancy plugin that lets you do that and it puts the lines back in such a way that triggers matched it. |