if it still floods out on 5, it's your fault dude, no IRC server on Earth will disconnect you for one message every 5 secs - you somehow flood it in some other way
if it floods out using puthelp, he might want to rise '#define msgrate' in server.c anyway.
puthelp SHOULD send only every 2 seconds anyway, so the queue code doesnt change much ^-^.
##### GENERAL SETTINGS ####
# EDIT the channel names or REMOVE one or two depending on which channel you intend the bot the advertise
set channel "#PE #PE1 #PE2 #PE3 #PE4 #PE5 #PE6 #PE7 #PE8 #PE9 #PE10 #PE11 #PE12 #PE13 #PE14 #PE15"
# 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 30
# EDIT the text or REMOVE or ADD lines including inverted commas at the starting and ending at each line
set text {
"MSGHERE"
}
##### 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 5 ;# 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"
De Kus wrote:if it floods out using puthelp, he might want to rise '#define msgrate' in server.c anyway.
puthelp SHOULD send only every 2 seconds anyway, so the queue code doesnt change much ^-^.
au contraire, it gives you configurable rate limiting, as opposed to hard-coded one in eggdrop's source
<demond> .tcl for {set i 0} {$i < 50} {incr i} {putqueue "privmsg #o:zone :test test test test test test test test test test test test test test test test test test test test test test "}