ganjafarmer Voice
Joined: 04 Jun 2007 Posts: 1
|
Posted: Mon Jun 04, 2007 8:31 am Post subject: Message on Timer help needed |
|
|
how can i get this script to send the first two messages to #chan1 and all 3 messages to #chan2 ?
| Code: | ##### GENERAL SETTINGS ####
set channel "#chan2 #chan2"
set time 10
set text {
"text1"
"text2"
"Text3"
}
##### DO NOT EDIT ANYTHING BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING #####
if {[string compare [string index $time 0] "!"] == 0} { set timer [string range $time 1 end] } { set timer [expr $time * 60] }
if {[lsearch -glob [utimers] "* go *"] == -1} { utimer $timer go }
proc go {} {
global channel time text timer
foreach chan $channel {
foreach line $text { putserv "PRIVMSG $chan :$line" }
}
if {[lsearch -glob [utimers] "* go *"] == -1} { utimer $timer go }
}
putlog "\002Loaded Message Script\002" |
Example #chan1 would get the messages text1 & text2 #chan2 would get messages text1, text2 & Text3 |
|