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.

How to run someproc on timed?

Old posts that have not been replied to for several years.
Locked
T
Terre

How to run someproc on timed?

Post by Terre »

I`ve got weather script wich work fine. But I want run that script on timed and results printed on my channel.
From weather.tcl:

bind pub - !weather weather::weatherpub
proc weatherpub {nick uhost handle chan text} {
blaa blaa blaa .....

How to run weatherpub automatically ?

This is asking args for weatherpub, how to give them?
bind time - "30 % % % %" weather::autoshow
proc autoshow{args} {
putserv "NOTICE #channel : {[weather::weatherpub]}"
}

Is there any better way to do that?
d
dollar
Op
Posts: 178
Joined: Tue Oct 28, 2003 3:47 pm
Location: Netherlands

Post by dollar »

bind time - "30 *" weather::autoshow
proc autoshow {args} {
putserv "NOTICE #channel :[weather::weatherpub $var1 $var2 $var3 $var4 $var5]"
}

Since proc weatherpub needs 5 args, you'd have to supply it with 5.
dollar (or something similar) at:
#eggdrop / #tcl - undernet
#egghelp / #tcl / #eggtcl - efnet
#eggdrop.support / #tcl - quakenet
#eggdrop - ircnet
T
Terre

Post by Terre »

Thanks, that i was looking for. Weatherscript is working now automatically.

But it is kind of stupid system now, I had to set those args manually.
And when I change time in "bind time - "30*", the bot must be restarted, with command .rehash there will be mess on channel :)

Any better ideas for timer system?

I´ve got one info channel in IRC and I would use timer for many scripts.
Locked