mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2003
Posts: 261
M
milosh Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Dec 2003
Posts: 261
Good evening to you all. I don't know if I shoud post this here, but don't know what is the problem so I made my choise.

So here goes the problem: I connect to the same server with two diferent nicks. One is using the proxy, other my real ip address.
When I loop all the nicks in some channel and do $address($nick(#,%index),5) on every nick I get some strange results.:

1. when I loop with my "real ip" nick (let's call it nick1) I get fine results - a list of all users with theit idents nad ips.
2. Problem: But, when I loop with my "proxy" nick (example nick2) I get only those users with host ips (dialUP-24-151.suonline.net, Omnia.Mea.Mecum.Porto, example).
So, when I try $address(NickWithNumericalIP, 5) I get $null... when I do $nick(#,%index) I get the whole nick list, but can't do $address of those nicks with numerical ips couse I get $null for everyone of them...

Sumary: I don't know if that has something to do with proxy... or not... I just can tell that I am using the same code on both nick1 and nick2. With nick1 (my ip) EVERYTHING is Ok. With nick2 (proxy) I can get nick list, but not the $address of the nick with numerical ip.

Hope that somebody can explain what is the problem.
thanx!


velicha dusha moja Gospoda
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
$address only returns the addresses in mIRC's IAL, type /who [color:green]#channel[/color] to fill mIRC's IAL for that channel, then try again.

Joined: Dec 2003
Posts: 261
M
milosh Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Dec 2003
Posts: 261
Yessss man, that worked just fine for me, but how to do that in my code.
Do I need to add a line /whois #channel, or there is a better way to refresh it. I don't like the whole list to display in my status window everytime I want to loop.
And why does it work on one nick, but doesn't work on other?
thanx!


velicha dusha moja Gospoda
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
Quote:
And why does it work on one nick, but doesn't work on other?

I'm not certain what you meant by that, but the reason it had some of the addresses is that those people had done something since you joined the channel (e.g said something).


You can't just put "who #" at the start of the loop because you have to wait for the reply to be sent containing the addresses. There are two solutions. One is to use a timer to wait a suitable amount of time before starting the loop, this isn't ideal if you're lagged or using it on large channels, nor would it hide the /who output. The other would be to use raws to hide the output and wait until the /who list had been sent.

Solution 1:
Code:
alias loop1 {
  if ( $ialchan(*,#,0) != $nick(#,0) ) {
    who #
    .timer 1 10 loop2
  }
  else {
    loop2
  }
}
alias loop2 {
  var %i = 1
  while ( $address($nick(#,%i),5) ) {
    echo -a $ifmatch
    inc %i
  }
}

To start it type /loop1 in a channel. It should then wait 10 seconds and list the addresses of all users in the channel.

Solution 2:
This isn't perfect and might be overkill, but should set you in the right direction:

Code here to keep post short.

To start it type /loop1 in a channel. If the IAL for that channel has all the addresses it will goto loop2, otherwise it will /who the channel (hiding the output), then call loop2.

Joined: Dec 2003
Posts: 261
M
milosh Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Dec 2003
Posts: 261
Thanx friend! The both things work just as you said. I will deside which to use cool
And also, the good thing is that I understand both of this codes smirk
Thanx again (and for the space for milosh.txt on your server grin)!


velicha dusha moja Gospoda

Link Copied to Clipboard