TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

Gag produces empty line

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
Harissa



Joined: 01 Apr 2017
Posts: 2

PostPosted: Sat Apr 01, 2017 3:43 pm    Post subject: Gag produces empty line Reply with quote

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
View user's profile Send private message
PowerGod



Joined: 04 Aug 2014
Posts: 297

PostPosted: Sun Apr 02, 2017 10:09 am    Post subject: Reply with quote

Could be useful to see the exact code you use and an example of a subtitution
Back to top
View user's profile Send private message
Harissa



Joined: 01 Apr 2017
Posts: 2

PostPosted: Sun Apr 02, 2017 12:44 pm    Post subject: Reply with quote

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
View user's profile Send private message
PowerGod



Joined: 04 Aug 2014
Posts: 297

PostPosted: Mon Apr 03, 2017 2:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
Slysven



Joined: 10 Apr 2011
Posts: 365
Location: As "Jomin al'Bara" in WoTMUD or Wiltshire, UK

PostPosted: Wed Apr 05, 2017 8:40 am    Post subject: Reply with quote

You are also loosing leading spaces after the \x0a (LF, Line-Feed) characters as well BTW...
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3746

PostPosted: Thu Apr 06, 2017 7:37 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
PowerGod



Joined: 04 Aug 2014
Posts: 297

PostPosted: Fri Apr 07, 2017 4:44 am    Post subject: Reply with quote

Scandum wrote:
Powergod: You can't reproduce this problem with #showme.


Sad
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3746

PostPosted: Sun Apr 16, 2017 6:57 pm    Post subject: Reply with quote

PowerGod wrote:
Scandum wrote:
Powergod: You can't reproduce this problem with #showme.


Sad

Well, I guess you could.

Code:

#showme;#showme;#showme gag this second try;#showme;#showme


Coffee
Back to top
View user's profile Send private message Send e-mail
PowerGod



Joined: 04 Aug 2014
Posts: 297

PostPosted: Wed Apr 19, 2017 12:44 pm    Post subject: Reply with quote

Scandum wrote:
PowerGod wrote:
Scandum wrote:
Powergod: You can't reproduce this problem with #showme.


Sad

Well, I guess you could.

Code:

#showme;#showme;#showme gag this second try;#showme;#showme


Coffee


lol
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> General Discussion All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group