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.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
simo
Revered One
Posts: 1139 Joined: Sun Mar 22, 2015 2:41 pm
Post
by simo » Tue Jan 20, 2026 8:53 pm
Greetingz,
is there a way to have the first 6 stacked modes +bbbbbb (or of course if there are less than 6 to send in total) be sent direct without any delay and everything after that
Code: Select all
proc StackUnbans {chan banlist {max 6}} {
set chan [string tolower $chan]
set count [llength $banlist]
while {$count > 0} {
if {$count> $max} {
set mode [string repeat "b" $max]
set masks [join [lrange $banlist 0 [expr {$max - 1}]]]
set banlist [lrange $banlist $max end]
incr count -$max
} else {
set mode [string repeat "b" $count]
set masks [join $banlist]
set count 0
}
incr counter 1
after [expr {$counter*4000}] [list puthelp "MODE $chan -$mode $masks"]
}
}
simo
Revered One
Posts: 1139 Joined: Sun Mar 22, 2015 2:41 pm
Post
by simo » Fri Jan 23, 2026 1:46 pm
Any help with this code?
CrazyCat
Revered One
Posts: 1379 Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:
Post
by CrazyCat » Fri Jan 23, 2026 7:17 pm
Did you try inverting the two lines:
incr counter 1
after [expr {$counter*4000}] [list puthelp "MODE $chan -$mode $masks"]
Become:
after [expr {$counter*4000}] [list puthelp "MODE $chan -$mode $masks"]
incr counter 1
simo
Revered One
Posts: 1139 Joined: Sun Mar 22, 2015 2:41 pm
Post
by simo » Sat Jan 24, 2026 10:01 am
thank you for your reply CrazyCat ,
ive tried your suggestion and got this error :
can't read "counter": no such variable
simo
Revered One
Posts: 1139 Joined: Sun Mar 22, 2015 2:41 pm
Post
by simo » Sat Jan 24, 2026 10:16 am
im not sure if its proper but i tried this and it seems to work
Code: Select all
if {![info exists counter]} { putquick "MODE $chan +$mode $masks" -next
} else { after [expr {$counter*5000}] [list puthelp "MODE $chan +$mode $masks"] }
incr counter 1
CrazyCat
Revered One
Posts: 1379 Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:
Post
by CrazyCat » Sat Jan 24, 2026 12:36 pm
simo wrote: ↑ Sat Jan 24, 2026 10:01 am
thank you for your reply CrazyCat ,
ive tried your suggestion and got this error :
can't read "counter": no such variable
Just initialize counter to 0 at the beginning of the procedure.
simo
Revered One
Posts: 1139 Joined: Sun Mar 22, 2015 2:41 pm
Post
by simo » Sat Jan 24, 2026 12:59 pm
you mean like this right ?
i've used it at the start of the proc as u suggested
that seems to work if i used proper