need help creating a multiline chat log

Post Reply
someboddy
Posts: 2
Joined: Wed Apr 07, 2010 10:39 pm

need help creating a multiline chat log

Post by someboddy »

Hi. I'm trying to use triggers to log the chat channels in Lusternia. All chat looks like this: (<channel): <speaker> says, "<blablabla>"

So I created a regex trigger - \((.*)\)\:(.*) - to get the (<channel): part and echo it to a user window. It works, but there is a problem with multiline chat - only the first line shows up.

I tried making it a multiline trigger, with the second trigger being the command prompt, but it doesn't work - the trigger is not launched when I do it that way.

Does anyone has any idea how to solve it?

kaeus
Posts: 50
Joined: Thu Dec 31, 2009 4:33 pm

Re: need help creating a multiline chat log

Post by kaeus »

If you have wrapwidth in the mud set to 0 and let mudlet handle wrapping, anything like that is considered on the same "line" for triggers. So your regex to capture chat would trigger on the line, then the rest of it would be picked up, regardless of how much mudlet wraps it.

someboddy
Posts: 2
Joined: Wed Apr 07, 2010 10:39 pm

Re: need help creating a multiline chat log

Post by someboddy »

That works! Thanks!

Though I would really like a multiline solution... Mudlet's wrapping periods at the end of words as separate from the word, so sometimes they get separated in the wrapping process...

User avatar
tsuujin
Posts: 695
Joined: Fri Feb 26, 2010 12:59 am
Location: California
Contact:

Re: need help creating a multiline chat log

Post by tsuujin »

I've seen this bug frequently, with quotation marks. The end quotation mark from many lines ends up on the following line. Also, it's frequently not at the correct wrapping position when this happens (should have characters left on the line, but the quotation mark ends up on the next line).

kaeus
Posts: 50
Joined: Thu Dec 31, 2009 4:33 pm

Re: need help creating a multiline chat log

Post by kaeus »

For simplicity of triggers, I'd always suggest letting mudlet do the wrapping. I'm sure that bug with periods will be fixed eventually, and having multiline text from the mud being read as one line makes things a LOT easier.

Post Reply