Auto Voice

By LeLewCrew on May 27, 2008

Just tipe +o -o +v - v

on *:input:*:{ 
  if (!$regex($1-,/(^/|^!)/Sig)) { 
    if ($regex($1,/^[+-]?[ov]$/)) { naja.mode $1- } 
  } 
} 

alias naja.mode { 
  if ($regex($1,/^[+-]?[ovu]$/)) && ($me isop #) { 
    if ($2 == all) { 
      var %a = 1,%b = $len($2) $iif($3,$len($3)) 
      while ($nick(#,%a)) { 
        if ($1 == +v) && ($nick(#,%a) !isop #) && ($nick(#,%a) !isvo #) && ($nick(#,%a) != $me) { %c = %c $nick(#,%a) } 
        if (($1 == -v) || ($1 == -o) || ($1 == -u)) && ($nick(#,%a) != $me) { %c = %c $nick(#,%a) } 
        if ($1 == +o) && ($nick(#,%a) !isop #) && ($nick(#,%a) != $me) { %c = %c $nick(#,%a) } 
        if ($1 == +u) && ($nick(#,%a) isreg #) && ($nick(#,%a) != $me) { %c = %c $nick(#,%a) } 
        if ($modespl == $numtok(%c,32)) { mode # $+($left($1,1),$str($right($1,1),$gettok(%c,0,32))) %c | %c = "" } 
        inc %a 
      } 
      if (%c) { mode # $+($left($1,1),$str($right($1,1),$gettok(%c,0,32))) %c | %c = "" } 
    } 
    else { 
      var %a = 1,%b = $len($2) $iif($3,$len($3)) 
      while ($nick(#,%a)) { 
        if ($if.active($2-,$nick(#,%a))) { 
          if ($1 == +v) && ($nick(#,%a) !isop #) && ($nick(#,%a) !isvo #) && ($nick(#,%a) != $me) { %c = %c $nick(#,%a) } 
          if (($1 == -v) || ($1 == -o) || ($1 == -u)) && ($nick(#,%a) != $me) { %c = %c $nick(#,%a) } 
          if ($1 == +o) && ($nick(#,%a) !isop #) && ($nick(#,%a) != $me) { %c = %c $nick(#,%a) } 
          if ($1 == +u) && ($nick(#,%a) isreg #) && ($nick(#,%a) != $me) { %c = %c $nick(#,%a) } 
          if ($modespl == $numtok(%c,32)) { mode # $+($left($1,1),$str($right($1,1),$gettok(%c,0,32))) %c | %c = "" } 
        } 
        inc %a 
      } 
      if (%c) { mode # $+($left($1,1),$str($right($1,1),$gettok(%c,0,32))) %c | %c = "" } 
    } 
  } 
  unset %a 
} 
alias if.active { 
  if ($gettok($1,0,32) > 1) { 
    var %x = 1 
    while ($gettok($1,%x,32)) { 
    if ($left($2,$len($gettok($1,%x,32))) == $gettok($1,%x,32)) { return true } | inc %x } 
  } 
  else { if ($left($2,$len($1)) == $1) { return true } } 
}

}
}

Comments

Sign in to comment.
LeLewCrew   -  Jun 11, 2008

you just tipe at channel +v nick Or +v

 Respond  
LeLewCrew   -  May 27, 2008

keke Testing

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.