A very simple voice (+v) user
Per channel basis. Use the channel menu to set or unset
User's set to NoVoice level will not receive autovoice ( per channel basis as well )
Simple Flood Protection Included.
No credit is needed as this is generic code used to help users learn alternate ways of doing things.
Simple note. This snippet does not use +v. It uses the /pvoice command
syntax is /pvoice <time in seconds to wait> $nick
This is used so that if someone else has set the nick +v or the nick is a higher level than +v it will not try to +v them again. This prevents filling up the screen with multiple unneeded +v's on a user joining. The time is set to wait 1 second. I would leave that as is.
on ^*:JOIN:#: {
if (%vflood > 4) halt
if ($nick != $me) && ($me isop $chan) && (%Prots.Voice. [ $+ [ $chan ] ] == on) && (NoVoice. [ $+ [ $chan ] ] !isin $level($address($nick,1))) { inc -u2 %vflood | /pvoice 1 $chan $nick }
}
menu channel {
.$iif(%Prots.Voice. [ $+ [ $active ] ],$style(1)) Auto Voice: $iif(%Prots.Voice. [ $+ [ $active ] ],unset %Prots.Voice. [ $+ [ $active ] ],set %Prots.Voice. [ $+ [ $active ] ] on)
}
menu nicklist {
.$iif(NoVoice. [ $+ [ $active ] ] isin $level($address($1,1)) ,$style(1)) NoVoice: $iif(NoVoice. [ $+ [ $active ] ] isin $level($address($1,1)),/ruser $v1 $address($1,1),/auser -a $v1 $address($1,1))
}
Feel free to refine the code or post your own examples.