Jump to content
chain

Mode op with numbers

Recommended Posts

  • Administrators
Posted
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 }
    }
  }
}

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...