##### GENERAL SETTINGS ####
# EDIT the channel names or REMOVE one or two depending on which channel you intend the bot the advertise
set channel "#GlowFactory #penance #gambino #EZ5 #unitedenmity #team.s2r #insane5! #teamglobal #temper #Findscrim-main #Toronto #Goat #sourceringer"
# 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 {
"Are you looking for professional, inexpensive webhosting, quality domain names, LOW ping game servers, or PROFESSIONAL web design? We offer webhosting packages at only $4 a month and consist of all the bandwidth and storage that you need! Domains are at $10 a year and we do accept PayPal! GlowFactory's professional design team can develop your professional, inexpensive website in just a matter of days! Stop by #GLOWFACTORY today!"
}
##### 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 }
proc go {} {
global channel time text timer
foreach chan $channel {
foreach line $text { putserv "PRIVMSG $chan :$line" }
}
if {[lsearch -glob [utimers] "* go *"] == -1} { utimer $timer go }
}
putlog "Loaded Advertise Script by es"
Only problem is that whenever it sends to the channels it floods out. Is there any way that someone can either:
1) Know of a different script with flood protection?
2) Can fix this script so it doesn't flood out?
Those things will be greatly appreciated. Thank you for your time.
Why can't you just show me? I never intended to spam... I just posted in one part of the forum and thought it was the wrong section so I posted another.
##### GENERAL SETTINGS ####
# EDIT the channel names or REMOVE one or two depending on which channel you intend the bot the advertise
set channel "#PE"
# 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 {
"AD"
}
##### 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 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"
I removed the ad if you were mad about that. I only have it going in 1 channel now, but when it trys to do them all it floods out.
if it still gets desconnected with "Excess Flood" reason, that can't possibly be because of this script - check your other scripts and do as much logging as possible (including +d); also experiment with frequency value
it doesn't matter how many channels this is run on, the freq value specifies how fast the output queue is being flushed to the server - in my code, that's being done every 2 seconds - i.e. you have a single message (doesn't matter for which channel) sent to the server every 2 seconds, for as long as the output queue is not empty - and this shouldn't flood the bot out (unless you are on a server with nazi flood settings)
heh, this is the simplest (yet efficient) form of output rate limiting - if you can't get this to work... you better stick with ready-made scripts and hope for the best (although I fail to see how another output rate limiting scheme would work for you, given that this wouldn't - I'd bet you somehow messed it up, possibly with another script)
Last edited by demond on Fri Jun 17, 2005 6:10 pm, edited 1 time in total.