#set the time to change topic in minutes (ex: for 8 hours = 8hours x 60mins = 480 mins)
set topic-at- 5
#set the channels to set the topic on delimited with commas (ex: #chan1,chan2)
set chan #channel-1,#channel-2
#set the topics u wanna use within double quots
set adtext {
"Best file compression around: 'DEL *.*' = 100% compression"
"If debugging is the process of removing bugs, then programming must be the process of putting them in."
"Doctor : A Person Who Kills Your Ills By Pills, And Kills You With His Bills."
}
set notnick "$botnick"
set notnick [string tolower ${nick}]
if {![info exists {ald}]} {
global notnick chan topic-at- adtext
set ald 1
timer ${topic-at-} printing
}
proc printing {} {
global notnick chan topic-at- adtext
set printochan [lindex $adtext [rand [llength $adtext]]]
putquick "TOPIC $chan :$printochan"
timer ${topic-at-} printing
}
#set the time to change topic in minutes (ex: for 8 hours = 8hours x 60mins = 480 mins)
set topictime 5
#set the channels to set the topic on delimited with commas (ex: #chan1,chan2)
set topicchans "#channel-1 #channel-2"
#set the topics u wanna use within double quots
set topictext {
"Best file compression around: 'DEL *.*' = 100% compression"
"If debugging is the process of removing bugs, then programming must be the process of putting them in."
"Doctor : A Person Who Kills Your Ills By Pills, And Kills You With His Bills."
}
if {[timerexists settopic] == ""} {
timer $topictime settopic
}
proc settopic {} {
global topictime topicchans topictext
set topic [lindex $topictext [rand [llength $topictext]]]
foreach chan $topicchans {
if {[botonchan $chan] && [botisop $chan]} {
putquick "TOPIC $chan :$topic"
}
}
timer $topictime settopic
}
PS: alltools.tcl should be loaded for the [timerexists] command to work.