All pastes #292829 Raw Edit

Unnamed

public text v1 · immutable
#292829 ·published 2006-12-26 23:36 UTC
rendered paste body
on *:TEXT:!Autovoice*:#: {
  if ($2 == $null) {
    notice $nick Please enter a setting for the autovoice e.g !Autovoice [On|Off]
  }
  elseif ($nick !ishop) {
    notice $nick You must be a halfop/op to set the autovoice settings for $chan
  }
  elseif ($nick !isop) {
    notice $nick You must be a halfop/op to set the autovoice settings for $chan
  }
  elseif ($2 == $readini(autovoice.ini, $chan $+ , setting)) {
    notice $nick Your setting is already set to $readini(autovoice.ini, $chan $+ , setting)
  }
  elseif ($2 == on) {
    /writeini autovoice.ini $chan $2
    notice $nick Autovoice settings for $chan set to: $2
  }
  elseif ($2 == off) {
    /writeini autovoice.ini $chan $2
    notice $nick Autovoice settings for $chan set to: $2
  }
}
on *:join:#: {
  if ($me ishop) && ($readini(autovoice.ini, $chan $+ , setting) == on) {
    /mode $chan +v $nick
  }
  elseif ($me isop) && ($readini(autovoice.ini, $chan $+ , setting) == on) {
    /mode $chan +v $nick
  }
}