This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Help with advertising bot script

Old posts that have not been replied to for several years.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

did you experiment with other freq values, say 5?

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
s
stevegarbz
Op
Posts: 104
Joined: Sat Dec 04, 2004 7:25 pm

Post by stevegarbz »

I put it on 7 once and it still errored.
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

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 ^-^.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
s
stevegarbz
Op
Posts: 104
Joined: Sat Dec 04, 2004 7:25 pm

Post by stevegarbz »

Well, are you sure it's not something in the code?

Code: Select all

##### 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"
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

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
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

stevegarbz wrote:Well, are you sure it's not something in the code?
as sure as that 2+2=4

this didn't flood out my bot:

Code: Select all

<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 "}
s
stevegarbz
Op
Posts: 104
Joined: Sat Dec 04, 2004 7:25 pm

Post by stevegarbz »

Hey it works now! I set the limit to 5. Thanks a lot!
Locked