|
|
Joined: Oct 2006
Posts: 7
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Oct 2006
Posts: 7 |
I have a problem with the $address identifier. I like to check the host from the user who start a PM or a DCC Chat. So I use this code for PM:
on *:OPEN:?:*:{ echo -s $address($query($nick),3) }
and this for DCC Chat:
on *:OPEN:=:*:{ echo -s $address($chat($nick),3) }
When I open a PM or a DCC Chat with my Bot I get this error: * /echo: insufficient parameters (line 2, test.mrc)
Now I don't know how I can read the host from the user, is it a bug or I have do something wrong?
|
|
|
|
Joined: Dec 2002
Posts: 2,962
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,962 |
The $address() identifier uses mIRC's Internal Address List (IAL). Unfortunately the IAL only stores the addresses of people who you share a channel with, which is why it returns nothing for PMs and DCCs. Instead you need to use the $fulladdress identifier which is always present in events, and then $mask() to change it into *!*@*.host format. eg. on *:OPEN:?:*:{
echo -s $mask($fulladdress,3)
}
Spelling mistakes, grammatical errors, and stupid comments are intentional.
|
|
|
|
Joined: Oct 2006
Posts: 7
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Oct 2006
Posts: 7 |
oh I don't know THX starbucks_mafia for the fast help
|
|
|
|
Joined: Feb 2006
Posts: 164
Vogon poet
|
Vogon poet
Joined: Feb 2006
Posts: 164 |
I also like to use this [ $+ $nick $+ $iif($ial($nick).addr != $null,$chr(32) $+ $v1,[mask not in ial]) $+ ]
|
|
|
|
Joined: Oct 2006
Posts: 7
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Oct 2006
Posts: 7 |
Hmm... $mask($fulladdress,3) doesn't work with DCC Chat. What I have to do to get the host when I start DCC Chat ?
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
Dcc chat is ip to ip you dont need a address u have there ip $chat(N/nick).ip
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
And if you need the address for something, then you'll probably have to /dns the person and take the resulting host information.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Dec 2002
Posts: 2,962
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,962 |
It seems strange/pointless not to make $fulladdress available in on open though since the information is provided in the DCC chat request.
Spelling mistakes, grammatical errors, and stupid comments are intentional.
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
I believe this should work when a request comes in
ctcp *:DCC:*:{ echo -s W: $wildsite F: $fulladdress }
|
|
|
|
|
|