egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

New Line || Line Break

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Landslyde
Halfop


Joined: 01 May 2014
Posts: 43

PostPosted: Tue Sep 05, 2017 4:48 pm    Post subject: New Line || Line Break Reply with quote

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:
putquick "NOTICE $nick :Type This \n That \n Something else"


I want the output to be:

Code:
This
That
Something else


This is just an example to demonstrate my need. Thanks for any and all help.
Back to top
View user's profile Send private message
willyw
Owner


Joined: 15 Jan 2009
Posts: 925

PostPosted: Tue Sep 05, 2017 5:04 pm    Post subject: Re: New Line || Line Break Reply with quote

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 !
Back to top
View user's profile Send private message
Landslyde
Halfop


Joined: 01 May 2014
Posts: 43

PostPosted: Tue Sep 05, 2017 5:29 pm    Post subject: Reply with quote

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:
\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:
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?
Back to top
View user's profile Send private message
willyw
Owner


Joined: 15 Jan 2009
Posts: 925

PostPosted: Tue Sep 05, 2017 5:44 pm    Post subject: Reply with quote

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/1.6.21/tcl-commands.html
and find:
putnow
command... and read the caution in the description ! Smile
_________________
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
Back to top
View user's profile Send private message
Landslyde
Halfop


Joined: 01 May 2014
Posts: 43

PostPosted: Tue Sep 05, 2017 6:49 pm    Post subject: Reply with quote

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 Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 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


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber