mIRC Homepage
Posted By: LisaMIRC [REQUEST] Mass DEOP/SOP $mw - 26/12/12 12:10 PM
Can someone help me with a alias script to deop myself and sop my self in all channels in 1 time ?
example

Code:
/Deop LisaMIRC for deop all channels

/op LisaMIRC for op in all channels
Posted By: KindOne Re: [REQUEST] Mass DEOP/SOP $mw - 26/12/12 05:36 PM
Not sure how you will be doing the op'ing, so I'm using ChanServ in this example.

This script might cause you to disconnect due to flooding depending on the network settings / how many channels you are in.

Code:
; This will deop me on every channel if I am op. 
; Syntax: /deopme
alias deopme { 
  var %x $chan(0) 
  while (%x) { 
    if ($me isop $chan(%x)) { 
      mode $chan(%x) -o $me 
      dec %x 
    }
    else {
      dec %x 
    }  
  }
}

; This will op me on every channel if I am not op.
; Syntax: /opme
alias opme { 
  var %x $chan(0) 
  while (%x) { 
    if ($me !isop $chan(%x)) { 
      msg ChanServ op $chan(%x) $me
      dec %x 
    }
    else {
      dec %x 
    }  
  }
}


Posted By: 5618 Re: [REQUEST] Mass DEOP/SOP $mw - 26/12/12 06:24 PM
Exact same script, but shorter:
Code:
; This will deop me on every channel if I am op. 
; Syntax: /deopme
alias deopme { 
  var %x = $chan(0) 
  while (%x) { 
    if ($me isop $chan(%x)) mode $v2 -o $me
    dec %x 
  }  
}
; This will op me on every channel if I am not op.
; Syntax: /opme
alias opme { 
  var %x = $chan(0) 
  while (%x) { 
    if ($me !isop $chan(%x)) msg ChanServ op $v2 $me
    dec %x 
  }
}
© mIRC Discussion Forums