This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

New Line || Line Break

Help for those learning Tcl or writing their own scripts.
Post Reply
L
Landslyde
Halfop
Posts: 46
Joined: Thu May 01, 2014 6:01 pm

New Line || Line Break

Post by Landslyde »

I don't know how to do this. And maybe it just can't be done. Dunno.

I want to break the lines at certain places (denoted by /n in my example):

Code: Select all

putquick "NOTICE $nick :Type This \n That \n Something else"
I want the output to be:

Code: Select all

This
That
Something else
This is just an example to demonstrate my need. Thanks for any and all help.
w
willyw
Revered One
Posts: 1205
Joined: Thu Jan 15, 2009 12:55 am

Re: New Line || Line Break

Post by willyw »

Landslyde wrote:I don't know how to do this. And maybe it just can't be done. Dunno.

I want to break the lines at certain places (denoted by /n in my example):
...
I don't think it can be done. Let's see what other responses you get on that.


I think you need a new putquick (or putserve) command for every time you want to put something on the server.

Therefore, if it were me, I would look to try to code it to split your line of text somehow. Once that is done, a
foreach
loop on that list, with a putquick command ought to do what you described.

The trick is finding a way to split up the line of text. If you have a few example lines, that you don't mind posting, we could maybe develop something.

I hope this helps.
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
L
Landslyde
Halfop
Posts: 46
Joined: Thu May 01, 2014 6:01 pm

Post by Landslyde »

willw:

Yeah, I've been using a putquick for each line, but that spews out the 15 lines very slowly. I have everything on just one putquick now (much faster), each item separated by a comma, but that's not the look I want.

And you may very well be right about this perhaps not being possible. I did an exhaustive search here before posting here and found nothing. Hopefully it can be done though.

Here are a few example lines you asked for:

Code: Select all

\002!def <word>\002 for word definitions
\002!w\002 for International Weather
\002!candy\002 for a list of candy to give yourself or someone else
\002!q\002 for the channel quote system
\002!s\002 for channel stats
\002!t\002 for Timebomb
\002!c\002 for funny Confuscious sayings
\002!mash\002 for funny quotes from the \002M*A*S*H\002 tv series - \002M\002obile \002A\002rmy \002S\002urgical \002H\002ospital
\002!bender\002 for Bender the Robot quotes
Currently I have them like this:

Code: Select all

putquick "NOTICE $nick :Type \002!def <word>\002 for word definitions, \002!w\002 for International Weather, \002!candy\002 for a list of candy to give yourself or someone else, \002!q\002 for the channel quote system, \002!s\002 for channel stats, \002!t\002 for Timebomb, \002!c\002 for funny Confuscious sayings, \002!mash\002 for funny quotes from the \002M*A*S*H\002 tv series - \002M\002obile \002A\002rmy \002S\002urgical \002H\002ospital, \002!bender\002 for Bender the Robot quotes"
And this works. But it'd look a lot better if I were able to use line breaks. And using each with its own putquick is super slow. Any ideas?
w
willyw
Revered One
Posts: 1205
Joined: Thu Jan 15, 2009 12:55 am

Post by willyw »

Landslyde wrote:
Yeah, I've been using a putquick for each line, but that spews out the 15 lines very slowly. I have everything on just one putquick now (much faster),
...
I might not have time, right now, to carefully read your post and try to respond. But I wanted to pass along this much for now:

http://www.eggheads.org/support/egghtml ... mands.html
and find:
putnow
command... and read the caution in the description ! :)
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
L
Landslyde
Halfop
Posts: 46
Joined: Thu May 01, 2014 6:01 pm

Post by Landslyde »

hey willyw:

I can live with that. It's a lot faster. And I only use it on my dedicated server where i run my little irc network. If it was a few hundred lines spewing out, that might be an issue (on other networks).

Thanks, willyw. I appreciate your help :D
Post Reply