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.

Sleep between commands...

Old posts that have not been replied to for several years.
Locked
T
TRiLoGY
Voice
Posts: 2
Joined: Sat Jul 23, 2005 7:16 pm

Sleep between commands...

Post by TRiLoGY »

Hi there

How can I make the script pause/sleep 250 millisecods between two commands, like this:

Code: Select all

putserv "NOTICE $nick :First message"
#sleep 250 ms
putserv "NOTICE $nick :Second message"
If it is only possible to sleep onde second or more, say it, it might help.

Regards,
TRiLoGY
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

why would you want to do that?
T
TRiLoGY
Voice
Posts: 2
Joined: Sat Jul 23, 2005 7:16 pm

Post by TRiLoGY »

i'm gathering information from a mysql table and it sends the messages to some members, but i don't want to send all messages imediatly, i want to pause betwen them, so the won't get banned by flood
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

see my code in this thread
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

i think he wants to use ms instead of seconds you can do this using after

Code: Select all

after 250 mycommand
then use update somewhere in a while.. to call back on it ..

or just add

Code: Select all

after 250
and it will block for 250 ms, but remember it will block everything
XplaiN but think of me as stupid
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

no need for [update], eggdrop maintains the Tcl event loop on its own, this is not tclsh (and I think we have already discussed that some time ago ;)
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

hehe sorry didn't mean to be a wizeass just have been away from the forum for a while ;) just was trying to help ..

hehe

tnx for the update notice good to know ;) wasn't sure about it..
XplaiN but think of me as stupid
Locked