tnx for your reply crazycat
the : if {[onchan [string trimleft [split $modex 0] "+-"] $chan]} { return 0 }
is to check if the first parameter doesnt contain a nick wich is on channel
and the pushmode2 was a typo should be pushmode
i tried your code it works for +l 22 but not for like +J 10
yes thommey told me pushmode only excepts RFC modes
but even using the custom pushmode thommey wrote for me doesnt seem to take it so it must be something else
proc massmode {chan mode arg} {
scan $mode {%[-+]%[bov]} p m
set j [llength $arg]
set k [expr {${::modes-per-line}-1}]
set out "";
for {set i 0} {$i<$j} {incr i} {
set args [lrange $arg $i [incr i $k]]
append out "MODE $chan $p[string repeat $m [llength $args]] [join
$args]\n"
}
putnow $out
}
oh euhm yea true didnt see that part thnx caesar heh
also the thing is if we use bind pubm o|o
it wont recognize like chanops and chanhalfops
as some may not have the flag set on them and there is no need to if they are chanops halfops
what would be the proper way to check if flag o is set on a nick to give it access to this command while also allowing regular chanops halfops access as well
proc massmode {chan mode arg} {
scan $mode {%[-+]%[bov]} p m
set j [llength $arg]
set k [expr {${::modes-per-line}-1}]
set out "";
for {set i 0} {$i<$j} {incr i} {
set args [lrange $arg $i [incr i $k]]
append out "MODE $chan $p[string repeat $m [llength $args]] [join $args]\n"
}
putnow $out
}
It appears that "bov" are in the first line, so try correcting it using: