| View previous topic :: View next topic |
| Author |
Message |
doggo Halfop
Joined: 05 Jan 2010 Posts: 97
|
Posted: Tue May 18, 2010 5:44 am Post subject: [SOLVED] Help with a timmer that doesnt want to work.. |
|
|
hi guys...
the script works fine with the public trigger its the time bind im having a problem with :/
i would like it to check every 60 minutes and set the limit if it needs to +10
so my question is does anyone know why the time bind wont work ?
| Code: | bind pub -|- -limit SaNcTuM_limit
bind time -|- "* 1 * * *" SaNcTuM_limit
proc SaNcTuM_limit{min hour day month year} {
foreach chan [channels] {
putlog "SaNcTuM_limit timer ok"
set newlimit [expr [llength [chanlist $chan]] + 10]
set currentlimit [currentlimit $chan]
if {$currentlimit < [expr $newlimit - 1] || $currentlimit > [expr $newlimit + 1]} {
putserv "mode $chan +l $newlimit"
}
}
}
proc currentlimit {chan} {
set currentmodes [getchanmode $chan]
if {[string match "*l*" [lindex $currentmodes 0]]} {
return [lindex $currentmodes end]
}
return 0
}
putlog "SaNcTuM_limit" |
thanks...  _________________ NON geeky!! http://gotcode4u.com/
Last edited by doggo on Tue May 18, 2010 8:09 pm; edited 1 time in total |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Tue May 18, 2010 3:44 pm Post subject: |
|
|
Your mask is not correct.
It would match whenever the hour value is 1. However, single-digit values are 0-padded to 2 (4 for year) digits; that is, 1 o'clock is actually 01.
But, you should not match the hour at all, but the minutes. The minute value will match a fixed value once every hour - which is what you'll want:
Examples: | Code: | #trigger every hour, on the hour:
bind time - "00 * * * *" proc
#trigger every hour, 15 minutes past the hour:
bind time - "15 * * * *" proc
#trigger every hour, 5 minutes past - more compact mask:
bind time - "05 *" proc |
_________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
doggo Halfop
Joined: 05 Jan 2010 Posts: 97
|
Posted: Tue May 18, 2010 8:12 pm Post subject: |
|
|
| nml375 wrote: | Your mask is not correct.
It would match whenever the hour value is 1. However, single-digit values are 0-padded to 2 (4 for year) digits; that is, 1 o'clock is actually 01.
But, you should not match the hour at all, but the minutes. The minute value will match a fixed value once every hour - which is what you'll want:
Examples: | Code: | #trigger every hour, on the hour:
bind time - "00 * * * *" proc
#trigger every hour, 15 minutes past the hour:
bind time - "15 * * * *" proc
#trigger every hour, 5 minutes past - more compact mask:
bind time - "05 *" proc |
|
Cheers nml375
i totaly see where i was messing it up now  _________________ NON geeky!! http://gotcode4u.com/ |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|