[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Suggestions
. . -> [Subject]  Logging Sessions and Stripping

Logging Sessions and Stripping

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Adamantplatypus   (9 posts)  [Biography] bio
Date Sat 12 Sep 2009 03:08 AM (UTC)

Amended on Sat 12 Sep 2009 03:11 AM (UTC) by Adamantplatypus

Message
I would -really- love to see an option for session logging that strips one's prompt and command input echos.

It's a lot of work and effort to have to edit a log by hand to remove the superfluous crap that doesn't need to be in there.


(I love MUSHclient!)
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Sat 12 Sep 2009 06:58 AM (UTC)
Message
That should be easy to do. In the logging configuration you can uncheck the option to log your own commands, so that would omit them.

Then for the prompts, make a trigger that matches a prompt line, and check "omit from log".

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Adamantplatypus   (9 posts)  [Biography] bio
Date Reply #2 on Sat 12 Sep 2009 06:01 PM (UTC)

Amended on Sat 12 Sep 2009 06:10 PM (UTC) by Adamantplatypus

Message
Well, I have 'log commands' unchecked, but it still keeps the echos. For instance:

pmote does a jig and hops in place
(my character) does a jig and hops in place

So I have to go back and erase the first part of all that, not sure why.

Nick Gammon said:


Then for the prompts, make a trigger that matches a prompt line, and check "omit from log".


My prompt changes constantly with ticks, I've got the time and weather and stuff in it. Can I configure to the changing parts, too?

[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Sat 12 Sep 2009 09:44 PM (UTC)
Message
Adamantplatypus said:

Well, I have 'log commands' unchecked, but it still keeps the echos. For instance:

pmote does a jig and hops in place
(my character) does a jig and hops in place

So I have to go back and erase the first part of all that, not sure why.


Well, that is from the MUD - unless you suppress it with a trigger that will always happen. Unchecking "log commands" stops it echoing "pmote does a jig and hops in place", however the line "(my character) does a jig and hops in place" is echoed because that is just another line from the MUD.

Adamantplatypus said:

My prompt changes constantly with ticks, I've got the time and weather and stuff in it. Can I configure to the changing parts, too?


Well, a trigger that has a "*" for the parts that change should do it.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Adamantplatypus   (9 posts)  [Biography] bio
Date Reply #4 on Sat 12 Sep 2009 10:01 PM (UTC)

Amended on Sat 12 Sep 2009 10:04 PM (UTC) by Adamantplatypus

Message
Nick Gammon said:


Well, a trigger that has a "*" for the parts that change should do it.


Okay, here's my prompt RIGHT NOW:


<1475/1475hp 716/722m 406/406mv 95 722 423> [It is 12:00am | Night Time] (Happiness: 96 | BPs: 100) [Common]


So....the hp, mana, movement and the three numbers after it (silver, gold and questpoints, in case anyone cares) change. The time and time both change. Happiness points change. And BPs change. Plus the common, that's the language I'm speaking.

I can't use * for all of them, can I? 'Cause I tried this and it's still picking up the prompt.
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #5 on Sun 13 Sep 2009 12:40 AM (UTC)
Message
Well, you can. It would help to see what you did, by posting your attempt here. So far we know you tried something, which didn't work.

Template:copying For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.


Basically I would try to trigger on something like:


<*/*hp */*m */*mv * * *> [It is * | *] (Happiness: * | BPs: *) [*]


Basically replace the things that vary by asterisks. Initially colour the line (in the trigger) so you can see that it fires. Then check "omit from log".

If you happen to have another trigger that also matches the prompt then that other one needs "keep evaluating" checked.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Adamantplatypus   (9 posts)  [Biography] bio
Date Reply #6 on Sun 13 Sep 2009 12:46 AM (UTC)

Amended on Sun 13 Sep 2009 01:49 AM (UTC) by Nick Gammon

Message
Yeah, for some reason it's not working, even with the evaluation option on. I did try it with it off AND on, this just reflects the "on" variety.


<triggers>
  <trigger
   enabled="y"
   keep_evaluating="y"
   match="&lt;*/*hp */*m */*mv * * *&gt; [It is * | *] (Happiness: * | BPs: *) [*]"
   omit_from_log="y"
   sequence="100"
  >
  </trigger>
</triggers>
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #7 on Sun 13 Sep 2009 01:53 AM (UTC)
Message
I tried your trigger on your sample line and it fired. I set the "change colour and style" to yellow so I knew it fired because it was in yellow.

Can you show a few lines of output from the MUD? Is there something on the end of the prompt? Maybe there are extra spaces I didn't see before.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #8 on Sun 13 Sep 2009 01:55 AM (UTC)
Message
Also, go to the Game menu and turn on Trace (Ctrl+Alt+T). That will tell you if other triggers are firing.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Adamantplatypus   (9 posts)  [Biography] bio
Date Reply #9 on Sun 13 Sep 2009 01:56 AM (UTC)

Amended on Sun 13 Sep 2009 02:02 AM (UTC) by Adamantplatypus

Message
Nick Gammon said:

I tried your trigger on your sample line and it fired. I set the "change colour and style" to yellow so I knew it fired because it was in yellow.

Can you show a few lines of output from the MUD? Is there something on the end of the prompt? Maybe there are extra spaces I didn't see before.



<1475/1475hp 669/722m 406/406mv 25 397 1297> [It is 5:00am | Night Time] (Happiness: 97 | BPs: 100) [Common]
i
You are carrying:
a glass of elvish wine
a glittering white stone
an elegant brass compass flask
an otter skin satchel
(Glowing) a spirit hoard

<1475/1475hp 669/722m 406/406mv 25 397 1297> [It is 5:00am | Night Time] (Happiness: 97 | BPs: 100) [Common]
Leynart floats in.

<1475/1475hp 693/722m 406/406mv 25 397 1297> [It is 5:30am | Night Time] (Happiness: 97 | BPs: 100) [Common]
Leynart informs Nichifor Prodan he can not complete his quest.
Nichifor Prodan says (to Leynart) 'I see my faith was miss placed with you.'
Nichifor Prodan says (to Leynart) 'You disappoint me.'

<1475/1475hp 693/722m 406/406mv 25 397 1297> [It is 5:30am | Night Time] (Happiness: 97 | BPs: 100) [Common]
Leynart mutters.
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #10 on Sun 13 Sep 2009 02:02 AM (UTC)
Message
OK, there were 2 spaces at the end of the prompt which weren't that obvious. If you had used the [code] tags it would have shown up because they preserve spacing. Anyway, this amended trigger (with an asterisk on the end) has matched what you just pasted:


<triggers>
  <trigger
   custom_colour="2"
   enabled="y"
   keep_evaluating="y"
   match="&lt;*/*hp */*m */*mv * * *&gt; [It is * | *] (Happiness: * | BPs: *) [*] *"
   omit_from_log="y"
   sequence="100"
  >
  </trigger>
</triggers>


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Adamantplatypus   (9 posts)  [Biography] bio
Date Reply #11 on Sun 13 Sep 2009 02:04 AM (UTC)
Message
WORKS! YAY! Thank you so much!
[Go to top] top

Posted by WillFa   USA  (525 posts)  [Biography] bio
Date Reply #12 on Sun 13 Sep 2009 09:02 PM (UTC)
Message
Nick Gammon said:

Adamantplatypus said:

Well, I have 'log commands' unchecked, but it still keeps the echos. For instance:

pmote does a jig and hops in place
(my character) does a jig and hops in place

So I have to go back and erase the first part of all that, not sure why.


Well, that is from the MUD - unless you suppress it with a trigger that will always happen. Unchecking "log commands" stops it echoing "pmote does a jig and hops in place", however the line "(my character) does a jig and hops in place" is echoed because that is just another line from the MUD.


Omit from Log just keeps it from getting written to the log file.

Pressing ALT+0 and unchecking "Echo my input in [Custom Color 10]" at the top left, omits the echo from the output window.

[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


30,185 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]