This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.
Old posts that have not been replied to for several years.
-
olo1
- Voice
- Posts: 1
- Joined: Thu May 26, 2005 5:31 pm
Post
by olo1 »
hey
i have a probleme. I tried to make a timer that msg the chan evry 20 min with 1 message. I tried it but im to stupid to make this code.
Can u make 1?
I need a timer that msg the chan evry 20 minuetes with a diffrent message.
20 min : msg1
40 min : msg2
60 min : msg3
evry hour 3 msg
-
greenbear
- Owner
- Posts: 733
- Joined: Mon Sep 24, 2001 8:00 pm
- Location: Norway
Post
by greenbear »
Code: Select all
set msgs {
{"msg 1"}
{"msg 2"}
}
set delay 20
set spamchan #channel
if ![string match -noc "*spam*" [timers]] {
timer $delay spam
}
proc spam {} {
set msg [lindex $::msgs [rand [llength $::msgs]]]
putserv "PRIVMSG $::spamchan :$msg"
timer $::delay spam
}