mIRC Home    About    Download    Register    News    Help

Print Thread
#240104 26/12/12 12:10 PM
L
LisaMIRC
LisaMIRC
L
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

Last edited by LisaMIRC; 26/12/12 12:11 PM.
Joined: Feb 2011
Posts: 471
K
Pan-dimensional mouse
Offline
Pan-dimensional mouse
K
Joined: Feb 2011
Posts: 471
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 
    }  
  }
}



5
5618
5618
5
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 
  }
}


Link Copied to Clipboard