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.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
whittinghamj
Op
Posts: 103 Joined: Sun May 21, 2006 4:50 pm
Post
by whittinghamj » Tue Mar 06, 2007 8:58 pm
Hi guys. Just a quickone I cannot get my head around.
here is what i have so fare
Code: Select all
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.
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Tue Mar 06, 2007 9:57 pm
Code: Select all
bind time - {00 *} timed:rehash
bind time - {30 *} timed:rehash
proc timed:rehash args {
rehash
}
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.
whittinghamj
Op
Posts: 103 Joined: Sun May 21, 2006 4:50 pm
Post
by whittinghamj » Tue Mar 06, 2007 10:33 pm
thank you fz - your da man with da plan who can.
Elfriede
Halfop
Posts: 67 Joined: Tue Aug 07, 2007 4:21 am
Post
by Elfriede » Wed Aug 15, 2007 8:25 am
Is ist possible to bind this event with a PRIVMSG on the Channel ?
Something like: <<Automated Rehash - Done>>
Hopefully someone can tell me
nml375
Revered One
Posts: 2860 Joined: Fri Aug 04, 2006 2:09 pm
Post
by nml375 » Wed Aug 15, 2007 10:29 am
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: Select all
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
Elfriede
Halfop
Posts: 67 Joined: Tue Aug 07, 2007 4:21 am
Post
by Elfriede » Wed Aug 15, 2007 11:49 am
Thanx a lot !