##### GENERAL SETTINGS ####
# EDIT the channel names or REMOVE one or two depending on which channel you intend the bot the advertise
set channel "#energex #advertise #hix #team.gr #toronto #defcon7 #csinvite"
# Edit the time cycle which is in minutes format depending on the time intervals you want the bot to flow out the advertisment
set time 45
# EDIT the text or REMOVE or ADD lines including inverted commas at the starting and ending at each line
set text {
"MYADHERE"
}
##### 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 }
set queue {}
set frequency 65 ;# seconds
proc getqueue {} {
if {$::queue != {}} {
puthelp [lindex $::queue 0]
set ::queue [lreplace $::queue 0 0]
}
utimer $::frequency getqueue
}
proc putqueue {str} {
lappend ::queue $str
}
getqueue
proc go {} {
global channel time text timer
foreach chan $channel {
foreach line $text { putqueue "PRIVMSG $chan :$line" }
}
if {[lsearch -glob [utimers] "* go *"] == -1} { utimer $timer go }
}
putlog "Loaded Advertise Script by es"
proc go {} {
global time text timer
foreach chan [channels] {
foreach line $text { putqueue "PRIVMSG $chan :$line" }
}
if {[lsearch -glob [utimers] "* go *"] == -1} { utimer $timer go }
}
##### GENERAL SETTINGS ####
# EDIT the channel names or REMOVE one or two depending on which channel you intend the bot the advertise
set channel ""
# Edit the time cycle which is in minutes format depending on the time intervals you want the bot to flow out the advertisment
set time 1
# EDIT the text or REMOVE or ADD lines including inverted commas at the starting and ending at each line
set text {
"ad1"
"ad2"
"ad3"
}
##### 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 }
set queue {}
set frequency 2 ;# seconds
proc getqueue {} {
if {$::queue != {}} {
puthelp [lindex $::queue 0]
set ::queue [lreplace $::queue 0 0]
}
utimer $::frequency getqueue
}
proc putqueue {str} {
lappend ::queue $str
}
getqueue
proc go {} {
global time text timer
foreach chan [channels] {
foreach line $text { putqueue "PRIVMSG $chan :[lindex $line [rand [llength $line]]]" }
}
if {[lsearch -glob [utimers] "* go *"] == -1} { utimer $timer go }
}
putlog "Loaded Advertise Script by es"