#by wiebe @ QuakeNet
#devoice users who do not have the access for it



setudef flag bitchvoice


bind mode - "% +v" bitchvoice:mode

proc bitchvoice:mode { nick uhost handle chan mode victim } {
#invalid chan
  if { ![validchan $chan] } { return }
#servermode
  if { [string equal $nick ""] } { return }
#bitchvoice not set
  if { ![channel get $chan bitchvoice] } { return }
#bot not able to change modes
  if { ![botisop $chan] && ![botishalfop $chan] } { return }
#mode is not +v
  if { ![string equal $mode +v] } { return }
#victim not on chan
  if { ![onchan $victim $chan] } { return }
#bot does the mode
  if { [isbotnick $nick] } { return }
#bot, master/owner does the mode
  if { [matchattr $handle bmn|mn $chan] } { return }
#victim has access to have voice
  if { [matchattr [nick2hand $victim] vlomn|vlomn $chan] } { return }
#victim is opped
  if { [isop $victim $chan] } { return }
#victim is halfopped
  if { [ishalfop $victim $chan] } { return }
#devoice!
  pushmode $chan -v $victim
}

