| View previous topic :: View next topic |
| Author |
Message |
simo Owner
Joined: 22 Mar 2015 Posts: 941
|
Posted: Mon Jan 03, 2022 9:12 pm Post subject: wont let me set maxbans on dalnet |
|
|
im testing this badnick tcl on dalnet and it seems the message to channel outputs as expected using max allowed modes per line wich on dalnet is 6
yet the ban part sets all kinds of channel modes except the bans and i cant figure why
| Code: |
bind pub -|o !n pub:badnickbanX7000
proc pub:badnickbanX7000 {nick host hand chan text} {
global botnick
set reason [join [lrange [split $text "."] 1 end] "."]
set text [lindex [split $text "."] 0]
if {$reason eq ""} { set reason "PLease Change Your NickName By Using \------> /NICK New-NICK And Rejoin By Using \------> /JOIN $chan ...... thank you." }
foreach user $text {
if {![onchan $user $chan]} {
lappend umasks *$user*!*@*
} else {
lappend umasks *$user*!*@*
}
}
if {[info exists umasks]} { stackBans3zXX $chan $umasks }
}
proc stackBans3zXX {chan banlist {max 6}} {
set count [llength $banlist]
while {$count > 0} {
if {$count> $max} {
set modex [string repeat "b" $max]
set masks [join [lrange $banlist 0 [expr {$max - 1}]]]
set banlist [lrange $banlist $max end]
incr count -$max
incr total $max
} else {
set modex [string repeat "b" $count]
set masks [join $banlist]
incr total $count
set count 0
}
putnow "privmsg $chan :+$modex $masks"
putnow "MODE $chan :+$modex $masks"
}
} |
| Quote: |
02:06:23 <@Cappuccino> !n Archer Barkley Behlke Bower Calan Cerell Donella Geldens Langdon Lion Meagan Naoma Ophelie Paine Petuu Piwowar Plossl Salmon Wachtel Wang
02:06:23 -HawkONE- : +bbbbbb *Archer*!*@* *Barkley*!*@* *Behlke*!*@* *Bower*!*@* *Calan*!*@* *Cerell*!*@* (DALnet)
02:06:23 @HawkONE Sets Mode on #Questions-ReLay to: +cn
02:06:23 -HawkONE- : +bbbbbb *Donella*!*@* *Geldens*!*@* *Langdon*!*@* *Lion*!*@* *Meagan*!*@* *Naoma*!*@* (DALnet)
02:06:23 @HawkONE Sets Mode on #Questions-ReLay to: +nsiMm
02:06:23 -HawkONE- : +bbbbbb *Ophelie*!*@* *Paine*!*@* *Petuu*!*@* *Piwowar*!*@* *Plossl*!*@* *Salmon*!*@* (DALnet)
02:06:24 @HawkONE Sets Mode on #Questions-ReLay to: +piPntsSm
02:06:26 -HawkONE- : +bb *Wachtel*!*@* *Wang*!*@* (DALnet)
02:06:28 @HawkONE Sets Mode on #Questions-ReLay to: +ctn |
|
|
| Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 792 Location: Tennessee, USA
|
Posted: Thu Jan 06, 2022 12:47 am Post subject: |
|
|
why the extra : in the mode command¿ _________________ SpiKe^^
Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
. |
|
| Back to top |
|
 |
simo Owner
Joined: 22 Mar 2015 Posts: 941
|
Posted: Thu Jan 06, 2022 10:43 am Post subject: |
|
|
| SpiKe^^ wrote: | | why the extra : in the mode command¿ |
i dont see the extra : tho
| Quote: | | putnow "MODE $chan :+$modex $masks" |
|
|
| Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 792 Location: Tennessee, USA
|
Posted: Thu Jan 06, 2022 11:33 am Post subject: |
|
|
Duh.
Copy your examples exactly, neatness counts... | Code: | | putnow "MODE $chan +$modex $masks" |
_________________ SpiKe^^
Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
. |
|
| Back to top |
|
 |
simo Owner
Joined: 22 Mar 2015 Posts: 941
|
Posted: Thu Jan 06, 2022 11:53 am Post subject: |
|
|
| im not sure i understand what you mean spike^^ ? |
|
| Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 792 Location: Tennessee, USA
|
Posted: Thu Jan 06, 2022 11:54 am Post subject: |
|
|
I will assume you have the script working now? _________________ SpiKe^^
Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
. |
|
| Back to top |
|
 |
simo Owner
Joined: 22 Mar 2015 Posts: 941
|
Posted: Thu Jan 06, 2022 12:32 pm Post subject: |
|
|
| no it doesnt seem to work proper it sets all kinds of channel modes and not the bans its suppose too |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Thu Jan 06, 2022 12:40 pm Post subject: |
|
|
In your code you have:
| Code: |
putnow "MODE $chan :+$modex $masks"
|
do you notice the : in front of the $modex? It shouldn't be there. Our guess is that it might be the cause of the issues you are experiencing.
Btw, why not stick with pushmode and why bother changing the function name and variables from original code? Asking for my pure curiosity.  _________________ Once the game is over, the king and the pawn go back in the same box.
Last edited by caesar on Thu Jan 06, 2022 12:41 pm; edited 1 time in total |
|
| Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 792 Location: Tennessee, USA
|
Posted: Thu Jan 06, 2022 12:40 pm Post subject: |
|
|
Please do as I said twice and remove the : from your mode line, or replace yours with the one I offered.
I don't know what else to tell you:) _________________ SpiKe^^
Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
. |
|
| Back to top |
|
 |
simo Owner
Joined: 22 Mar 2015 Posts: 941
|
Posted: Thu Jan 06, 2022 1:17 pm Post subject: |
|
|
sorry my bad had a moment there
that seems to have fixed it
thanks Gents SpiKe^^ Caesar |
|
| Back to top |
|
 |
|