I want to make a script for advertising our sponsors's "messages" every hour or so, but a different message each time (random), how do I do this?
thanks
Code: Select all
set adchan "#shells"
set ads { "ad 1"
"ad 2"
"so forth"
"so on"
}
bind time - "00 *" time:ad
proc time:ad { mi h d m y } {
global adchan ads
puthelp "PRIVMSG $adchan :[lindex $ads [rand [llength $ads]]]"
return
}
Code: Select all
set adchan "#shells"
Code: Select all
set ads { "ad 1"
"ad 2"
"so forth"
"so on"
}
bind time - "25 *" time:ad
proc time:ad { mi h d m y } {
foreach adchan [channels] {
puthelp "PRIVMSG $adchan :[lindex $::ads [rand [llength $::ads]]]"
}
return
}
Code: Select all
proc time:ad { mi h d m y } {
set currentad "[lindex $::ads [rand [llength $::ads]]]"
foreach adchan [channels] {
puthelp "PRIVMSG $adchan :$currentad"
}
return
}
Code: Select all
set adchan "#teamefn"
set ads { "WiredLabs"
"WiredServers"
"Olternit"
"iDesigns"
}
bind time - "25 *" time:ad
proc time:ad { mi h d m y } {
set currentad "[lindex $::ads [rand [llength $::ads]]]"
foreach adchan [channels] {
puthelp "PRIVMSG $adchan :$currentad"
}
return
}