Jump to content

Simple Voice On Join


err0r

Recommended Posts

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.

Link to comment
Share on other sites

Guest Travis

Edit:

 

syntax is /pvoice <time in seconds to wait> $chan $nick

 

 

Soulfly uses this feature to wait a few seconds to make sure the nick is still in the room before giving it voice. For this application I like using more than one second.

 

If anyone is reading this who likes to make aop lists and such, please take note. Seeing a room of people flood mode changes whenever someone joins looks pretty noobish.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...