|
|
Joined: Oct 2007
Posts: 214
Fjord artisan
|
OP
Fjord artisan
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
Hoopy frood
|
Hoopy frood
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.
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...
on !*:JOIN:#: {
if (!$eval($+(%,didwho.,$nick),2)) {
set -eu10 $+(%,didwho.,$nick) $true
who $nick
}
}
|
|
|
|
Joined: Dec 2002
Posts: 503
Fjord artisan
|
Fjord artisan
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.
|
|
|
|
Joined: Dec 2002
Posts: 2,031
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,031 |
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.
|
|
|
|
Joined: Jun 2007
Posts: 933
Hoopy frood
|
Hoopy frood
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.
|
|
|
|
|
|