Triggers only run when a newline is reached. If your line lacks a newline, it's considered a partial line, and triggers won't run until a newline is reached.
Have you looked into Telnet subnegotiations? Protocols like GMCP send data as part of a subnegotiation packet, which is automatically not displayed by a decent client. Example:
(Negotiate the GMCP protocol to be enabled
(client) IAC DO GMCP
(server) IAC WILL GMCP
(Send a hello message to begin)
(client) IAC SB GMCP Core.Hello {"client": "MUSHclient", "version": "4.81"} IAC SE
(Enable the char package)
(client) IAC SB GMCP Core.Supports.Add ["Char 1"] IAC SE
(Later, the server may send a stats message)
(server) IAC SB GMCP Char.Stats {"health": [10, 10], "mana": [10, 10], "stamina": [10, 10]} IAC SE
On MUSHclient's side, you'd want a GMCP plugin (Nick and I both provide versions) in order to make the messages available to other code.
If you prefer a trigger-based approach, I'd recommend using something more similar to Aardwolf's tags. (I may get this wrong, I don't play Aard, but I know the concept's the same):
{stats}10/10;10/10;10/10{/stats}
Here, there'd be a newline after the {/stats} tag. The only reason I recommend against using \e as the escape is because that's already used for ANSI color codes, i.e. "\e[35;43mMagenta on Yellow\e[0m". |