mIRC Home    About    Download    Register    News    Help

Print Thread
#67239 09/01/04 09:52 PM
Joined: Oct 2003
Posts: 7
A
Albano Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
A
Joined: Oct 2003
Posts: 7
Hi People!
i wish to add -o+v when i go away, multichannel deop & multiserver support. I have a simple code, but this code deop only in one channel no multiserver no multichannel no -o+v supporting

this is code

alias daway {
if ((!$1) && ($active !ischan)) { echo * /daway: insufficient parameters | halt }
if (!$1) { who $active | .enable #daway | halt }
if ($1 !ischan) { echo /daway: insufficient parameters | halt }
who $1
.enable #daway
}
raw 352:*:{ if (($6 isop $2) && (G isin $7)) { ChanServ deop $2 $6 } | halt }
raw 315:*:{ .disable #daway }

command for deop is /daway i want to deop with this command in all channel & network that I have OP

THANKS

#67240 12/01/04 02:26 AM
Joined: Dec 2003
Posts: 219
F
Fjord artisan
Offline
Fjord artisan
F
Joined: Dec 2003
Posts: 219
Multi-channels:
$chan(0) returns the number of channels you are on.
$chan(X) returns the name of the Xth channel you are on.
May I suggest you:

Code:
alias daway {
  /var %inc = 0
  /while (%inc < $chan(0)) {
    /inc %inc
    /if ($me isop $chan(%inc)) { /mode $chan(%inc) +v-o $me }
  }
}


Multi-servers:
When you connect to a server, a $cid is assigned to it.
$scon(0) returns total number of open server windows.
The /scid command allows you to switch from one to another $cid.

Code:
alias dserv {
  /var %inc = 0
  /while (%inc < $scon(0)) {
    /inc %inc
    /scon %inc /daway
  }
}


By the way, the -a switch on the /scon performs the command on all connection ids. No more loop needed.
So:

Code:
alias dserv { /scon -a /daway }


Hope this will help smile


Link Copied to Clipboard