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.

Pb with several lines to display

Help for those learning Tcl or writing their own scripts.
Post Reply
r
ryal
Voice
Posts: 35
Joined: Thu May 12, 2005 6:10 pm

Pb with several lines to display

Post by ryal »

Here's my pb:
i made a script that is supposed to display (in pm) about 10 lines of text in average. But its very slow and if several people are using the command that triggers it, the bot put it all in queue. And i can imagine that if theres to many people to trigger it the bot will end up pinging out.
So is there a way to:
1/ display the messages faster ? (maybe an option i havent seen in .conf ...)
2/ display the messages at the same time for different people ? so that there is basically no queue
Thanks in advance guys.
As soon as i get rid of this issue, ill post my tcl and i hpe lots of people will find it usefull
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Speeding up the output will only cause your bot to flood out faster, you're searching for the worst. You have to do the opposite, use a slower queue. The slowest and most recommended for sending text is [puthelp].
r
ryal
Voice
Posts: 35
Joined: Thu May 12, 2005 6:10 pm

Post by ryal »

Thanks for your reply!
I did as you said and replaced my "putserv" with a "puthelp" and it works just fine. I have an other pr tho: when 2 people (or more) trigger the bot at the same time the bot sends the lines to the first one and then to the second. Is there any way to send them the lines simultaneously? so that the second one dont have to wait for a while before receiving.
Thanks in advance
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

If you don't want the bot to flood out, [puthelp] is what you need. Sending all the messages simultaneously will cause your bot to flood out, so I suggest you keep it the way it is now.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

your imagination deceives you ;)

you got it all wrong, it's the other way around - your bot will probably `ping out' if you don't use eggdrop's queueing facilities and dump stuff directly to server socket synchronously (using blocking I/O)

some servers allow sending PRIVMSG to multiple targets, check out yours
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
r
ryal
Voice
Posts: 35
Joined: Thu May 12, 2005 6:10 pm

Post by ryal »

Mine obviously don't.
Im still using using "puthelp" dont worry about that.
But heres what ive done: instead of having a process that contains a big "for" loop with a line to display within, i made a process that displays one line and then calls himself (till all the lines to display are done). This way it works just the way i wanted it to. Maybe some of you will laugh when they see the code cause it may not be that pretty haha.
Code is now ready so ill up it in the tcl archives section, hope you'll enjoy it, i know i do. Oh i forgot, what is it about? well basically the script consists in parsing a tv site to get information about shows. Since tvtome is gone and tv.com just sucks (sorry), i guess this tcl could seduce some of you. An example:
[10:56:28] <ryal> !epinfo csi new york
[10:56:31] <MOVINFO> (Show: CSI: New York)-(Next: 2x07-Manhattan Manhunt - airs the 2005-11-09)-(Previous: 2x06-YoungBlood - aired the 2005-11-02)
[10:57:14] <MOVINFO> For more info: http://episodeworld.com/modules.php?nam ... w&csid=553

Thats it, thanks for your support about my (silly :p) questions guys!
Post Reply