mIRC Home    About    Download    Register    News    Help

Print Thread
#17985 04/04/03 02:37 AM
Joined: Feb 2003
Posts: 23
M
Mog Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Feb 2003
Posts: 23
For some reason, when I use /scon <connection number> it doesn't switch the connection.


Setting network to 1 (/scon 1)
* Set connection id to: 1
Setting network to 2 (/scon 2)
* Set connection id to: 2
Setting network to 3 (/scon 3)
* Active connection id: 3

I was using this in a remote script to do commands (not a single command, multipul commands, so I can't use it by itself) but it doesn't actually change the script to be on a different connection. Can anyone help?

#17986 04/04/03 02:47 AM
Joined: Dec 2002
Posts: 698
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 698
Code:
alias works {
  var %i = 1
  while $scon(%i) {
    scon %i
    echo -s Connection: %i
    echo -s Cid: $cid
    echo -s Server: $iif($server,$server,$status)
    inc %i
  }
}

#17987 04/04/03 03:19 AM
Joined: Dec 2002
Posts: 698
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 698
Just adding a few comments :[/b])
Code:
alias works {
 
  ; set a starting point to loop through connections
  var %i = 1

  ; loop until there are no more connections
  while $scon(%i) {
 
    ; switch the connection
    scon %i
 
    ; perform a few commands
    echo -s Connection: %i
    echo -s Cid: $cid
    echo -s Server: $iif($server,$server,$status)
 
    ; inc %i and continue on with the looping
    inc %i
  }
}


Link Copied to Clipboard