mIRC Home    About    Download    Register    News    Help

Print Thread
#240104 26/12/12 12:10 PM
Joined: Nov 2012
Posts: 19
L
Pikka bird
OP Offline
Pikka bird
L
Joined: Nov 2012
Posts: 19
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: 448
K
Pan-dimensional mouse
Offline
Pan-dimensional mouse
K
Joined: Feb 2011
Posts: 448
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 
    }  
  }
}



Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
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