mIRC Home    About    Download    Register    News    Help

Print Thread
#89541 08/07/04 12:37 AM
Joined: Feb 2004
Posts: 119
D
da_hype Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Feb 2004
Posts: 119
how do i make this while loops code scan for channels in multi servers too?

Code:
var %p = 1,%s = 1
  while (%p <= $chan(0)) {
    did -a $dname 1 $chan(%p) $iif(%s <= $scid(0),$+([,$scid(%s).network,]))
    inc %p
    inc %s
  }

#89542 08/07/04 12:53 AM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Code:
var %s = 1
while ($scon(%s)) {
  var %p = 1
  while ($chan(%p)) {
    did -a $dname 1 $chan(%p) $iif(%s <= $scon(0),$+([,$scon(%s).network,]))
    inc %p
  }
  inc %s
}


New username: hixxy
#89543 08/07/04 04:23 AM
Joined: Feb 2004
Posts: 119
D
da_hype Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Feb 2004
Posts: 119
the code u gave shows the diff networks but not the correct channels...

like if on dalnet i on #help
and on webnet i'm on #mirc

in the dialog is whould show

#help [dalnet]
#mirc [webnet]

your codes shows


#help [dalnet]
#help [webnet]
if dalnet is the active connection, and

#mirc [dalnet[
#mirc [webnet]

if webnet is the active connection.




#89544 08/07/04 04:33 AM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Ah, my apologies, i forgot to change the connection, change:

Code:
while ($scon(%s)) {  
var %p = 1


To:

Code:
while ($scon(%s)) {  
scon %s
var %p = 1


New username: hixxy
#89545 08/07/04 05:06 AM
Joined: Feb 2004
Posts: 119
D
da_hype Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Feb 2004
Posts: 119
thanks.. 1 last question...

on this $nick($chan,0)
it will return the amount of user in a channel, on an active server.

how to make it check for users in

#help [webnet]
#help [dalnet]




#89546 08/07/04 08:09 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
in Tidy's example, use $chan(%p,) instead of $chan. This will get the current channel in the loop.


-KingTomato

Link Copied to Clipboard