on !@*:TEXT:!*:#:{
  if ($1 == !op) {
    if ($2 == $null) { mode # +o $nick | return }
    if ($2 isnum) {
      if ($gettok($2-,*,32) > 1) {
        var %inc = 0
        while %inc != $gettok($2-,*,32) {
          inc %inc
          var %opz = $nick(#,$gettok($2-,%inc,32)) %opz
          var %sopz = o $+ %sopz
        }
        mode # + $+ %sopz %opz
      }
      else { if $nick(#,$2) != $me mode # +o $nick(#,$2) | return }
    }
  }
  if ($1 == !deop) && ($2 != $me) {
    if ($2 == $null) { mode # -o $nick | return }
    if ($2 isnum) {
      if ($gettok($2-,*,32) > 1) {
        var %inc = 0
        while %inc != $gettok($2-,*,32) {
          inc %inc
          if ($nick(#,$gettok($2-,%inc,32)) != $me) {
            var %opz = $nick(#,$gettok($2-,%inc,32)) %opz
            var %sopz = o $+ %sopz
          }
        }
        mode # - $+ %sopz %opz
      }
      else { if $nick(#,$2) != $me mode # -o $nick(#,$2) | return }
    }
  }
}
Published in: mIRC
Download

Related snippets