hello group and help
I need help for an announcement code of a message to each nick in the room every 5 min
example:
hello nick1 don't fall asleep
and 5 min later
hello nick2 don't fall asleep
etc..
Code: Select all
namespace eval randmsg {
setudef flag randmsg
bind cron - "*/5 * * * *" ::randmsg::do
proc do {mi ho da mo dow} {
foreach chan [channels] {
if {![channel get $chan randmsg]} { continue }
set ulist [chanlist $chan]
set vict [lindex $ulist [rand [llength $ulist]]]
putserv "PRIVMSG $chan :hello $vict, don't fall asleep"
}
}
}