mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2003
Posts: 28
E
Ameglian cow
OP Offline
Ameglian cow
E
Joined: Jan 2003
Posts: 28
i want to display all my channel & servers that i`m on like this
Code:
Server: irc2.mirc.com
Channel: #animerev
Channel: #xsiteclub
Server: irc.aniverse.com
Channel: #sysreset

this is what i have
Code:
alias servchan {
  /servers
}
alias -l servers {
  var %connection.serv.tmp $scon(0)
  var %connection.serv.start 1
  var %loop 1
  :loop
  if (%connection.serv.tmp > 0) { 
    .msg $nick Server: $scon(%connection.serv.tmp).server
/channel
    dec %connection.serv.tmp  
  }
  else {  
    unset %connection.serv.*
    inc %loop
  }
  if (%loop == 1) {
    goto loop
  }
}
alias -l channels {
  var %connection.chan.tmp $chan(0)
  var %connection.chan.start 1
  var %loop 1
  :loop
  if (%connection.chan.tmp > 0) { 
    .msg $nick Channel: $chan(%connection.chan.tmp)
    dec %connection.chan.tmp  
  }
  else {  Server: irc2.mirc.com
Channel: #animerev
Channel: #xsiteclub
Server: irc.aniverse.com
Channel: #sysreset   

    unset %connection.chan.*
    inc %loop
  }
  if (%loop == 1) {
    goto loop
  }
}

but it doesn`t display it the way i want
it displays like this
Code:
Server: irc2.mirc.com
Channel: #animerev
Channel: #xsiteclub
Server: irc.aniverse.com
[color:red]
Channel: #animerev
Channel: #xsiteclub
[/color] 

(the red part is the wrong part)

so can some1 help me with this

Joined: Nov 2003
Posts: 227
H
Fjord artisan
Offline
Fjord artisan
H
Joined: Nov 2003
Posts: 227
its a little messy, but try this:
Code:
alias allchans {
  var %x = 1
  while (%x <= $scon(0)) {
    scon %x | var %y = $chan(0)
    scon %x | echo 4 -a Server: $server
    while (%y) {
      scon %x | echo -a Channel: $chan(%y)
      dec %y
    }
    inc %x
  }
}

the channel names will be in reverse order

Joined: Jan 2003
Posts: 28
E
Ameglian cow
OP Offline
Ameglian cow
E
Joined: Jan 2003
Posts: 28
yeah
thnx man
that did the trick laugh

but now it need to be able to display it in a msg to a channel or query
smirk

Joined: Jan 2003
Posts: 28
E
Ameglian cow
OP Offline
Ameglian cow
E
Joined: Jan 2003
Posts: 28
k i fix it already :tongue:


Link Copied to Clipboard