| View previous topic :: View next topic |
| Author |
Message |
whittinghamj Op
Joined: 21 May 2006 Posts: 103
|
Posted: Tue Mar 06, 2007 8:58 pm Post subject: [ SOLVED ] Timed rehash |
|
|
Hi guys. Just a quickone I cannot get my head around.
here is what i have so fare
| Code: |
proc timed:rehash { nick uhost hand chan text} {
rehash
}
|
I am not sure about the bind line to make it run on its own every 30 minutes.
Please could someone help?
Cheers
Quest
Last edited by whittinghamj on Tue Mar 06, 2007 10:34 pm; edited 1 time in total |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Tue Mar 06, 2007 9:57 pm Post subject: |
|
|
| Code: | bind time - {00 *} timed:rehash
bind time - {30 *} timed:rehash
proc timed:rehash args {
rehash
} |
| Quote: | TIME (stackable)
bind time <flags> <mask> <proc>
proc-name <minute> <hour> <day> <month> <year>
Description: allows you to schedule procedure calls at certain
times. mask matches 5 space separated integers of the form:
"minute hour day month year". minute, hour, day, month have a
zero padding so they are exactly two characters long; year is
four characters. Flags are ignored. |
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
whittinghamj Op
Joined: 21 May 2006 Posts: 103
|
Posted: Tue Mar 06, 2007 10:33 pm Post subject: |
|
|
| thank you fz - your da man with da plan who can. |
|
| Back to top |
|
 |
Elfriede Halfop
Joined: 07 Aug 2007 Posts: 67
|
Posted: Wed Aug 15, 2007 8:25 am Post subject: |
|
|
Is ist possible to bind this event with a PRIVMSG on the Channel ?
Something like: <<Automated Rehash - Done>>
Hopefully someone can tell me  |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Wed Aug 15, 2007 10:29 am Post subject: |
|
|
Not sure wether you are asking to trigger the rehash using a public message, or simply like a notification about rehash being done in a channel..
Assuming the latter, you could use something like this (with a few bells'n'whistles such as rehash-time):
| Code: | bind evnt - rehash postRehash
bind evnt - prerehash preRehash
bind evnt - prerestart preRestart
set ppNotifyChannel "#theChannel"
proc postRehash {evnt} {
puthelp "PRIVMSG $::ppNotifyChannel :Rehash completed in [expr [clock clicks -milliseconds] - $::ppRehashTime] milliseconds."
}
proc preRehash {evnt} {
puthelp "PRIVMSG $::ppNotifyChannel :Rehashing..."
set ::ppRehashTime [clock clicks -milliseconds]
}
proc preRestart {evnt} {
puthelp "PRIVMSG $::ppNotifyChannel :Restarting, Be right back..."
} |
_________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
Elfriede Halfop
Joined: 07 Aug 2007 Posts: 67
|
Posted: Wed Aug 15, 2007 11:49 am Post subject: |
|
|
Thanx a lot !  |
|
| Back to top |
|
 |
|