mIRC Home    About    Download    Register    News    Help

Print Thread
#195886 05/03/08 02:37 AM
Joined: Oct 2007
Posts: 214
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Oct 2007
Posts: 214
Hello,

When a user joins a chan, my script is set to do /who on the user to gather information from the raw 311 like $address, the only problem is it displays the same amount of times that a user is on series of channels (3channels, 3times) of the same lines which I would only return only 1 line.

Ex.

Code:

raw 311:*: {
echo $color(join) $comchan($2,1) › Address: *! $+ $ial($2).user $+ @*
}

End Result:
› Address: *!5f67d56b2beb4a8b8ff3433eea054532@*
› Address: *!5f67d56b2beb4a8b8ff3433eea054532@*
› Address: *!5f67d56b2beb4a8b8ff3433eea054532@*





any ideas?

Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

Something to consider is that the server sends the address in the join message, so no /who is needed at all for nicks that join after you. Also, as long as the IAL is enabled, the address will automatically be stored.

Code:

raw 311:*: {
  if (!$eval($+(%,didwho.,$2),2)) {
    set -eu10 $+(%,didwho.,$2) $true
    echo $color(join) $comchan($2,1) › Address: *! $+ $ial($2).user $+ @*
  }
}



Actually, you should do the checking in the join event instead so you only /who the nick once...

Code:

on !*:JOIN:#: {
  if (!$eval($+(%,didwho.,$nick),2)) {
    set -eu10 $+(%,didwho.,$nick) $true
    who $nick
  }
}



RoCk #195888 05/03/08 05:15 AM
Joined: Dec 2002
Posts: 503
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
Also, a 311 is part of a /whois reply, not a /who (which has a 352 reply).

In any case, all the address information is gathered from the JOIN anyway, so doing an extra /who or /whois is really unnecessary.

Bekar #195891 05/03/08 02:15 PM
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

Originally Posted By: Bekar

Also, a 311 is part of a /whois reply, not a /who (which has a 352 reply).



True, I wasn't even paying that much attention to the numeric. Thanks for the correction. smile

Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
and the 3 times is probably due to the on JOIN event, which is triggering for every channel the users joins, so you should limit it to one channel or use a variable to check if that nick was last checked with the script or not.


Link Copied to Clipboard