egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

bind time, each quarter, (but hourly an extra command)

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
DarkDeviL
Voice


Joined: 03 Jul 2005
Posts: 10
Location: Denmark

PostPosted: Mon Dec 19, 2005 11:34 am    Post subject: bind time, each quarter, (but hourly an extra command) Reply with quote

Hey!

As I said in the topic, I have it like:

Code:
bind time - "0 * * * *" ac_quarter
bind time - "15 * * * *" ac_quarter
bind time - "30 * * * *" ac_quarter
bind time - "45* * * *" ac_quarter

proc ac_quarter {min hour day month year} {
  if {$min=="0"} {
    ac_check
    timer 1 ac_check2
  } else {
    ac_check
 }
}


Hourly, I want to do the same as each quarter, but additional an extra command should be used too, is this impossible?

I tried with if {$min=="0"}, and if {!$min} {, no one of them works hourly.

But if I do '.tcl ac_quarter 0 <some more bullshit here>', it works fine..

Simply, it ignore the hourly change when doing it automatically..

It should use ac_check hourly, and one minute after ac_check2.

If I remove ALL of the if-then-else stuff, it works fine each quarter.

Someone who know what the problem is?
_________________
DarkDeviL.
E-mail: append '@staynet.org' to 'darkdevil'.
WWW: www.DarkDeviL.dk
IRC: #DarkDeviL, at irc.staynet.org
Back to top
View user's profile Send private message Visit poster's website
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Mon Dec 19, 2005 11:58 am    Post subject: Reply with quote

Try
Code:
if {[string equal 00 $min]} {

_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
DarkDeviL
Voice


Joined: 03 Jul 2005
Posts: 10
Location: Denmark

PostPosted: Mon Dec 19, 2005 2:08 pm    Post subject: Reply with quote

Sir_Fz wrote:
Try
Code:
if {[string equal 00 $min]} {


00 ?

Is it "00 * * * *" (zero twice) when the hour changes?

if, then it's the bind there's wrong? Shocked
_________________
DarkDeviL.
E-mail: append '@staynet.org' to 'darkdevil'.
WWW: www.DarkDeviL.dk
IRC: #DarkDeviL, at irc.staynet.org
Back to top
View user's profile Send private message Visit poster's website
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Mon Dec 19, 2005 2:17 pm    Post subject: Reply with quote

True! good eye there DarkDevil, it should be 00 in the bind and it will work perfectly as it is (without using the line I gave you).
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
DarkDeviL
Voice


Joined: 03 Jul 2005
Posts: 10
Location: Denmark

PostPosted: Mon Dec 19, 2005 2:33 pm    Post subject: Reply with quote

Isn't that a bug in the eggdrop then?

I just checked my crontab, in there the '0 * * * * <command>' works fine. Surprised
_________________
DarkDeviL.
E-mail: append '@staynet.org' to 'darkdevil'.
WWW: www.DarkDeviL.dk
IRC: #DarkDeviL, at irc.staynet.org
Back to top
View user's profile Send private message Visit poster's website
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Mon Dec 19, 2005 4:55 pm    Post subject: Reply with quote

DarkDeviL wrote:
Isn't that a bug in the eggdrop then?

I just checked my crontab, in there the '0 * * * * <command>' works fine. Surprised

Not necessary a bug, it maybe takes it as a string 00 rather than a number. btw
Code:
bind time - "00 * * * *" ac_quarter

can be reduced to
Code:
bind time - "00 *" ac_quarter

since '*' matches everything (including spaces).
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Tue Dec 20, 2005 12:08 am    Post subject: Reply with quote

DarkDeviL wrote:
Isn't that a bug in the eggdrop then?

I just checked my crontab, in there the '0 * * * * <command>' works fine. Surprised


eggdrop has nothing to do with crontab, so requiring 00 is not a bug
_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
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


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber