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.

Is this possible ? (utimer)

Help for those learning Tcl or writing their own scripts.
Post Reply
N
NTHosts
Op
Posts: 100
Joined: Mon Oct 10, 2005 9:57 pm
Location: UK
Contact:

Is this possible ? (utimer)

Post by NTHosts »

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 ?
www.NT-Hosts.Net - More than just a host
User avatar
krimson
Halfop
Posts: 86
Joined: Wed Apr 19, 2006 8:12 am

Post by krimson »

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
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

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"]
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

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...
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

have you tried using puthelp instead of putserv?
(sometimes it's better to just use the easiest method)
Post Reply