View previous topic :: View next topic |
Author |
Message |
Harissa
Joined: 01 Apr 2017 Posts: 2
|
Posted: Sat Apr 01, 2017 3:43 pm Post subject: Gag produces empty line |
|
|
I tried all sort of things, but, what ever I do, gag zaps the line contents and subs a '\n' for it, so, I get whole chunks of empty lines in my terminal (and, in my log).
Is there anything at all I can do about those?
thanks! |
|
Back to top |
|
 |
PowerGod
Joined: 04 Aug 2014 Posts: 352
|
Posted: Sun Apr 02, 2017 10:09 am Post subject: |
|
|
Could be useful to see the exact code you use and an example of a subtitution |
|
Back to top |
|
 |
Harissa
Joined: 01 Apr 2017 Posts: 2
|
Posted: Sun Apr 02, 2017 12:44 pm Post subject: |
|
|
Hi,
I just used a straight forward 'gag', but, seeing that no-one
else chimed in, I started to suspect that it's a mud specific
issue, and not a tintin problem. (bear with me, I now have a new
(but gag related) tintin problem!)
So, I logged in raw (which showed nothing unusual):
(ungagged)
Scanning down, you see:
the matron of the Green Dragon, right here.
a local gossip, immediately below you.
a publican, immediately below you.
You hear some mindless drivel.
You hear some mindless drivel.
You hear some mindless drivel.
You hear some mindless drivel.
... and then I had a look in emacs hex mode. Lo and behold, this
turns up:
00005c00: 5b30 3b33 373b 3430 6d0a 5363 616e 6e69 [0;37;40m.Scanni
00005c10: 6e67 2064 6f77 6e2c 2079 6f75 2073 6565 ng down, you see
00005c20: 3a0a 2020 2074 6865 206d 6174 726f 6e20 :. the matron
00005c30: 6f66 2074 6865 2047 7265 656e 2044 7261 of the Green Dra
00005c40: 676f 6e2c 2072 6967 6874 2068 6572 652e gon, right here.
00005c50: 0a20 2020 6120 6c6f 6361 6c20 676f 7373 . a local goss
00005c60: 6970 2c20 696d 6d65 6469 6174 656c 7920 ip, immediately
00005c70: 6265 6c6f 7720 796f 752e 0a20 2020 6120 below you.. a
00005c80: 7075 626c 6963 616e 2c20 696d 6d65 6469 publican, immedi
00005c90: 6174 656c 7920 6265 6c6f 7720 796f 752e ately below you.
00005ca0: 0a0a 596f 7520 6865 6172 2073 6f6d 6520 ..You hear some
00005cb0: 6d69 6e64 6c65 7373 2064 7269 7665 6c2e mindless drivel.
00005cc0: 0a0a 596f 7520 6865 6172 2073 6f6d 6520 ..You hear some
00005cd0: 6d69 6e64 6c65 7373 2064 7269 7665 6c2e mindless drivel.
00005ce0: 0a0a 596f 7520 6865 6172 2073 6f6d 6520 ..You hear some
00005cf0: 6d69 6e64 6c65 7373 2064 7269 7665 6c2e mindless drivel.
00005d00: 0a0a 596f 7520 6865 6172 2073 6f6d 6520 ..You hear some
00005d10: 6d69 6e64 6c65 7373 2064 7269 7665 6c2e mindless drivel.
00005d20: 0a --> this dot is the part '.' of the ..You .
So, it looks to me like this '0a' is Ascii 10, the NL (new line
feed), and it's sent twice, whilst the gag most likely only caters for one NL type char.
So, my questions has morphed into: how do I gag the new line feed
char?
thanks!
[/quote] |
|
Back to top |
|
 |
PowerGod
Joined: 04 Aug 2014 Posts: 352
|
Posted: Mon Apr 03, 2017 2:56 pm Post subject: |
|
|
I can't reproduce... gag seems to remove all the new lines...
Code: |
#gag {gag this}
#OK. {gag this} IS NOW GAGGED.
#showme {\n\n\nfirst try\n\n\n}
first try
#showme {\n\n\ngag this second try\n\n\n}
|
|
|
Back to top |
|
 |
Slysven
Joined: 10 Apr 2011 Posts: 375 Location: As "Jomin al'Bara" in WoTMUD or Wiltshire, UK
|
Posted: Wed Apr 05, 2017 8:40 am Post subject: |
|
|
You are also loosing leading spaces after the \x0a (LF, Line-Feed) characters as well BTW... |
|
Back to top |
|
 |
Scandum Site Admin
Joined: 03 Dec 2004 Posts: 3842
|
Posted: Thu Apr 06, 2017 7:37 pm Post subject: |
|
|
You can use #gag {^$} to gag empty lines. Probably not what you want though.
I'll put multiline gags at the top of my todo list. I looked into it before but there was some kind of difficulty with implementing it.
Powergod: You can't reproduce this problem with #showme. |
|
Back to top |
|
 |
PowerGod
Joined: 04 Aug 2014 Posts: 352
|
Posted: Fri Apr 07, 2017 4:44 am Post subject: |
|
|
Scandum wrote: | Powergod: You can't reproduce this problem with #showme. |
 |
|
Back to top |
|
 |
Scandum Site Admin
Joined: 03 Dec 2004 Posts: 3842
|
Posted: Sun Apr 16, 2017 6:57 pm Post subject: |
|
|
PowerGod wrote: | Scandum wrote: | Powergod: You can't reproduce this problem with #showme. |
 |
Well, I guess you could.
Code: |
#showme;#showme;#showme gag this second try;#showme;#showme
|
 |
|
Back to top |
|
 |
PowerGod
Joined: 04 Aug 2014 Posts: 352
|
Posted: Wed Apr 19, 2017 12:44 pm Post subject: |
|
|
Scandum wrote: | PowerGod wrote: | Scandum wrote: | Powergod: You can't reproduce this problem with #showme. |
 |
Well, I guess you could.
Code: |
#showme;#showme;#showme gag this second try;#showme;#showme
|
 |
lol |
|
Back to top |
|
 |
|