hi,
trying to fix so my eggdrop execute a cmd
on a certain time, i got the .tcl file loaded but it wont execute to so guess i just sux on these kinda things
this is was i got:
bind time - test time_cmdexe
proc time_cmdexe {12 00}
help appreciated
(this shows up when i type .bind time in partyline)
TYPE FLGS COMMAND HITS BINDING (TCL)
time -|- test 0 time_cmdexe
that's the format for binding time. It passes the time to the proc. From your example it seems you want to execute at 12.. Bind time works on a 24 hour clock so this would be achieved with something like
bind time - "00 12 * * *" time_cmdexe
or
bind time - "00 00 * * *" time_cmdexe
depending on AM or PM. This binds the command to every time the clock strikes 12, the asterisks signifying that we want it to execute on any day, any month and any year.
I think your making a mistake in the way your writing your proc and maybe you need to look at how proc's work again. They are passed information, in this case, they're passed the time that the bind executed, so your proc should be something like:
proc time_cmdexe {min hour day month year} {
dccbroadcast "Timer executed at $hour:$min $day $month $year"
}
thx for taking time with this!!
changed to what u wrote.. and now it goes abit further:
this is the whole code
bind time - "15 13 * * *" time_dayupwinner
proc time_dayupwinner { } {
if {[catch {set weektop [open "|/glftpd/bin/dayupwinner" r]}] != 0} {
putlog "ERROR - Couldn't execute"
putlog "Is it located in the bin dir and is it chmoded?"
close $weektop ; return ;
}
set line [gets $weektop]
while {![eof $weektop]} {
if { $line == 0 } {
putserv "PRIVMSG $chan :Testing "
close $weektop ; return ;
}
putserv "PRIVMSG $chan :$line"
set line [gets $weektop]
}
close $weektop
}
[13:15] TCL error [time_dayupwinner]: called "time_dayupwinner" with too many arguments
i get now, have tryed to change the lines alot of times, but cant get rid of that msg, feels like it's just a small thing that has to be changed. plz help again, thx /Danne