this tcl sends msg to several channels in form random, the detail of error of the tcl is that spent the two hour provokes a mistake of time of mailing
example in partyline:
<(Kantuta> [10:31:01] Tcl error in script for 'timer6196':
<(Kantuta> [10:31:01] invalid command name ""
and once this mistake goes out the tcl stops working and does not throw any more msg phrases.
please someone who could help me.
Code: Select all
####### tcl ##############
### SPEAK ###
set spoken.v "Auto talk"
## -=[ SPEAK ]=- Set the next line as the channels you want to run in #
## for all channel just type "*" if only for 1 channel or 2 chnnel just #
## type "#channel1 #channel2"#
set speaks_chans "#beni #beni2 #pando #lapaz #cremacamba"
# Set you want in XXX minute you bot always talk on minute #
set speaks_time "8"
# Set the next lines as the random speaks msgs you want to say #
set speaks_msg {
"hi chat hi to all :) hi $chan"
"that so beautiful day, and that day is today."
"welcome to channel :D"
"remember that the mutual respect is always indispensable in the channel"
}
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 [subst [lindex $speaks_msg [rand [llength $speaks_msg]]]]
foreach msgline [split $speaks_rmsg \n] {
putserv "PRIVMSG $chan :$msgline"
}
}
if {![string match "*time_speaks*" [timers]]} {
timer $speaks_time time_speaks
}
}