View previous topic :: View next topic |
Author |
Message |
kn1ghtt Voice
Joined: 01 Aug 2022 Posts: 10
|
Posted: Wed Oct 12, 2022 7:09 pm Post subject: msj and nick random chan and 5 min other nick channel list |
|
|
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.. |
|
Back to top |
|
 |
CrazyCat Revered One

Joined: 13 Jan 2002 Posts: 1108 Location: France
|
Posted: Thu Oct 13, 2022 5:41 am Post subject: |
|
|
Code: | 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"
}
}
} |
Add the +randmsg to the channels you want the script works on them, and wait. _________________ https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community. |
|
Back to top |
|
 |
|