Rigth click in the channel you want and select ON
menu channel {
$iif($chan isin %limchns,$style(5)) Floatlim
.$iif($chan !isin %limchns,ON): set %limchns $addtok(%limchns,$chan,33) | setlimit | echo $color(info) $chan $timestamp * Floatlim for $chan enabled.
.$iif($chan isin %limchns,OFF): set %limchns $remtok(%limchns,$chan,33) | .timerlimit [ $+ [ # ] ] off | echo $color(info) $chan $timestamp * Floatlim for $chan disabled.
.SET [ [ %lim. [ $+ [ $chan ] ] ] ]:set %lim. [ $+ [ $chan ] ] $$?="Floatlim:"
}
ON *:OP:#: { if ($chan isin %limchns) && ($opnick == $me) { setlimit | echo $color(info) $chan $timestamp * Floatlim for $chan enabled due to op. } }
ON *:JOIN:#: { if ($chan isin %limchns) && ($me isop $chan) && (!$timer(limit [ $+ [ # ] ])) && ($nick == $me) { setlimit | echo $color(info) $chan $timestamp * Floatlim for $chan enabled. } }
ON *:DEOP:#: { if ($timer(limit [ $+ [ # ] ])) && ($opnick == $me) { .timerlimit [ $+ [ # ] ] off | echo $color(info) $chan $timestamp * Floatlim for $chan disabled due to deop. } }
ON *:KICK:#: { if ($timer(limit [ $+ [ # ] ])) && ($knick == $me) { .timerlimit [ $+ [ # ] ] off | echo $color(info) $chan $timestamp * Floatlim for $chan disabled due to kick. } }
ON ^*:PART:#: { if ($timer(limit [ $+ [ # ] ])) && ($nick == $me) { .timerlimit [ $+ [ # ] ] off | echo $color(info) $chan $timestamp * Floatlim for $chan disabled due to part. } }
alias setlimit { if (!%lim. [ $+ [ $chan ] ]) { set %lim. [ $+ [ $chan ] ] 3 } | .timerlimit [ $+ [ $chan ] ] 0 600 mode $chan +l $ $+ calc($ $+ nick( $+ # $+ ,0) + % $+ lim. [ $+ [ $chan ] ] ) }
on 1:ACTIVE:#: { if ($chan isin %limchns) && ($me isop $chan) && (!$timer(limit [ $+ [ # ] ])) { setlimit | echo $color(info) $chan $timestamp * Floatlim for $chan enabled due to active. } }
Ok as it stands its a pretty ok code only i few things that i noticed that should be tweeked a bit A) where is the setlimit alias B) $iif statements hold 2 conditions so you could have \"$iif($chan !isin %limchns,ON,OFF)\" this way you can handle both conditions under one menu item. C) instead of using \"limit [ $+ [ # ] ]\" i would try using \"$+(limit,#)\" or \"$+(limit,$chan) it will make the code more ledgeable.