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.
Help for those learning Tcl or writing their own scripts.
NTHosts
Op
Posts: 100 Joined: Mon Oct 10, 2005 9:57 pm
Location: UK
Contact:
Post
by NTHosts » Tue Jun 27, 2006 1:09 pm
say i have a simple responder script that says a few lines like...
Code: Select all
putserv "msg $chan :bleah"
putserv "msg $chan :bleah"
putserv "msg $chan :bleah"
putserv "msg $chan :bleah"
is it possible to set utimers between them like..
Code: Select all
putserv "msg $chan :bleah"
utimer 1
putserv "msg $chan :bleah"
utimer 1
putserv "msg $chan :bleah"
utimer 1
putserv "msg $chan :bleah"
so it says the next like exactly a second later ?
krimson
Halfop
Posts: 86 Joined: Wed Apr 19, 2006 8:12 am
Post
by krimson » Tue Jun 27, 2006 2:53 pm
they would just print out one after another, but one second later than the first time
i would suggest using utimer in utimer. something like this:
Code: Select all
utimer 1 { putserv "msg $chan :bleah"
utimer 1 { putserv "msg $chan :bleah"
utimer 1 { putserv "msg $chan :bleah"
[...]
}
}
}
it should do what you want
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Tue Jun 27, 2006 6:44 pm
Code: Select all
putserv "msg $chan :bleah"
utimer 1 [list putserv "msg $chan :bleah"]
utimer 2 [list putserv "msg $chan :bleah"]
utimer 3 [list putserv "msg $chan :bleah"]
De Kus
Revered One
Posts: 1361 Joined: Sun Dec 15, 2002 11:41 am
Location: Germany
Post
by De Kus » Wed Jun 28, 2006 4:11 am
As long there is a server queue, it cannot be determined how many seconds it delays. Per default the queue cycle is every 2 secs, so its impossible to have 1 second delay. And still then (when you decrease it in server.c, use putquick or putdccraw), IRC is a laggy thing and 1-2 seconds go missing in some netlag pretty fast.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under
The MIT License
Love hurts, love strengthens...
DragnLord
Owner
Posts: 711 Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA
Post
by DragnLord » Wed Jun 28, 2006 10:53 am
have you tried using puthelp instead of putserv?
(sometimes it's better to just use the easiest method)