countdown.tcl
#2
You try to call a proc designed for a public command with a cron, it can't work, the proc won't get the required arguments.
You can try to replace your bind with the following one and it associated proc:
tcl
bind cron - "00 */4 * * *" cron_countdown
proc cron_countdown {min hour day month dow} {
   pub_countdown $::botnick "bot@127.0.0.1" $::botnick countdown_chans ""
}



This will work if countdown_chans has only one channel, if you want to use several ones, the proc must become:
tcl
proc cron_countdown {min hour day month dow} {
   foreach chan [split $::countdown_chans] {
      pub_countdown $::botnick "bot@127.0.0.1" $::botnick $chan ""
   }
}


Répondre


Messages dans ce sujet
countdown.tcl - par aslpls - 14/11/2023, 09:03
RE: countdown.tcl - par CrazyCat - 14/11/2023, 09:19
RE: countdown.tcl - par aslpls - 14/11/2023, 14:11
RE: countdown.tcl - par CrazyCat - 14/11/2023, 14:23

Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)
Tchat 100% gratuit -Discutez en toute liberté