mIRC Home    About    Download    Register    News    Help

Topic Options
#190108 - 16/11/07 12:34 AM loop through all servers and channels
pouncer Offline
Hoopy frood

Registered: 02/10/05
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?

Top
#190109 - 16/11/07 12:42 AM Re: loop through all servers and channels [Re: pouncer]
Bekar Offline
Fjord artisan

Registered: 11/12/02
Posts: 503
Loc: Melbourne, Australia
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.

Top
#190110 - 16/11/07 12:46 AM Re: loop through all servers and channels [Re: Bekar]
pouncer Offline
Hoopy frood

Registered: 02/10/05
Posts: 827
that is perfect bekar, but can it list in order instead of reversed?

Top
#190112 - 16/11/07 01:06 AM Re: loop through all servers and channels [Re: pouncer]
Bekar Offline
Fjord artisan

Registered: 11/12/02
Posts: 503
Loc: Melbourne, Australia
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
  }
}

Top