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:
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.
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:
alias dserv { /scon -a /daway }
Hope this will help