mIRC Home    About    Download    Register    News    Help

Print Thread
loop through all servers and channels #190108 16/11/07 12:34 AM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
anyone have an alias i can use to loop through all server status connections open and then loop through each channel for the server status and echo it?

Re: loop through all servers and channels [Re: pouncer] #190109 16/11/07 12:42 AM
Joined: Dec 2002
Posts: 503
B
Bekar Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
And echo it?
Code:
alias loopy {
  var %con = $scon(0)
  while (%con) {
    scon %con
    var %cha = $chan(0)
    while (%cha) {
      echo -a :: $server :: $chan(%cha) ::
      dec %cha
    }
    dec %con
  }
}

That's the general idea of what you're wanting.

Re: loop through all servers and channels [Re: Bekar] #190110 16/11/07 12:46 AM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
that is perfect bekar, but can it list in order instead of reversed?

Re: loop through all servers and channels [Re: pouncer] #190112 16/11/07 01:06 AM
Joined: Dec 2002
Posts: 503
B
Bekar Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
Code:
alias loopy {
  var %con = 1
  while ($scon(%con)) {
    scon %con
    var %cha = 1
    while ($chan(%cha)) {
      echo -a :: $server :: $v1 ::
      inc %cha
    }
    inc %con
  }
}