################################################################################################################
## set the channel to display automatic WoW lines, include the '#' prefix
set wowchans "*"
## set the timer interval (in minutes) between WoW lines
set wowtime "60"
if { [info exists wowtime] } { timer $wowtime "timer:wow" }
set wowtxt "wow.txt"
set wowver "v2.01"
bind pub - !wow disp:wow
proc disp:wow {nick host handle chan text} {
# Need to leave 'wowchan' in the global dec so it'll carry over to the timer
global wowchans wowchan wowtxt
# test if the channel is in the wowchans list and set 'wowchan' accordingly.
if {[lsearch -exact $wowchans $chan] != -1} {
set wowchan $chan
} else {
# did not match a channel in the "wowchans list"
return
}
if { [isop $nick $wowchan] || [ishalfop $nick $wowchan] || [isvoice $nick $wowchan] } {
if { [lindex $text 0] != "" } {
set wowto [lindex $text 0]
} else {
set wowto $wowchan
}
set wowfile [open $wowtxt r]
set wowread [split [read $wowfile] \n]
close $wowfile
putserv "PRIVMSG $wowto :[lindex $wowread [rand [llength $wowread]]] "
} else {
set wowfile [open $wowtxt r]
set wowread [split [read $wowfile] \n]
close $wowfile
putserv "PRIVMSG $nick :[lindex $wowread [rand [llength $wowread]]] "
}
}
proc timer:wow {} {
global botnick wowchans wowchan wowtime wowtxt
set wowfile [open $wowtxt r]
set wowread [split [read $wowfile] \n]
close $wowfile
foreach wowchan $wowchans {
if { [onchan $botnick $wowchan] } {
putserv "PRIVMSG $wowchan :[lindex $wowread [rand [llength $wowread]]] "
}
}
timer $wowtime "timer:wow"
}
putlog "Words of Wisdom $wowver TCL (timer: $wowtime mins) - Loaded! "
#
You'll have to use the command channels instead of "*" to get the list of current channels (can't expect a wildcard to expand to a list of channels, now can you...).
##########################################################################################
## Discription ##
## ##
## nicepal.adv.tcl Version 1.0 Date: 07 October 2002 Monday ! ##
## Advertizing Your messeges in channel rendom types .. ##
## Created by NicePaL and Very Thanks for Pulse (#Eggdrop) Who Help me for Bugs. ##
## I Hope you will like my this 2nd TCL as you have been used nicepal.tcl ##
## Downlaod cute TCL's from www.EggHelp.org/tcl.htm aLso Thanks for slennox ##
## For Help Join #Eggdrop or #DALnetBoT Thanks for using my TCL ##
## ##
##########################################################################################
## Set your channel for Advertize your text messeges ..
## If you want to Advertize in all channel where is your bot parking then use "*"
## other "#channel"
set speaks_chans "*"
# Set you want in XXX minute you bot always talk on minute
set speaks_time "10"
## ----------------------------------------------------------------
## --- Don't change anything below here if you don't know how ! ---
## ----------------------------------------------------------------
### Advertizing Messeges are Here ###
# Set the next lines as the random speaks msgs you want to say
set speaks_msg {
"Write Down you Advertizing messeges here"
"www.Egghelp.org/tcl.htm is cute Web site for TCL's"
"WeLcome to #Eggdrop and #DALnetBoT channel, Where you can Get OnLine Help"
}
if {![string match "*time_speaks*" [timers]]} {
timer $speaks_time time_speaks
}
proc time_speaks {} {
global speaks_msg speaks_chans speaks_time
if {$speaks_chans == "*"} {
set speaks_temp [channels]
} else {
set speaks_temp $speaks_chans
}
foreach chan $speaks_temp {
set speaks_rmsg [lindex $speaks_msg [rand [llength $speaks_msg]]]
puthelp "PRIVMSG $chan :$speaks_rmsg"
timer $speaks_time time_speaks
return 1
}
}
putlog "Advertizing in Channel loaded Successfuly..."
putlog "Ver 1.0 By NicePaL & Special Thanks for Pulse #DALnetBoT & #EggDrop"
That last script has the return-command inside the foreach loop, which is why it only sends to one channel... simply removing it should solve the problem