|
Joined: Sep 2011
Posts: 5
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Sep 2011
Posts: 5 |
Hello, i just upgrade to latest version and i notice that identifier $address(nickname,type) does not work. Is this happens only for me or anyone else have that problem too?
|
|
|
|
Joined: Oct 2003
Posts: 3,918
Hoopy frood
|
Hoopy frood
Joined: Oct 2003
Posts: 3,918 |
You'll have to give a working example. $address() works fine here.
- argv[0] on EFnet #mIRC - "Life is a pointer to an integer without a cast"
|
|
|
|
Joined: Sep 2011
Posts: 5
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Sep 2011
Posts: 5 |
var %userHost = $address($nick, 2)
I use this inside an ONJOIN remote
|
|
|
|
Joined: Jul 2006
Posts: 4,213
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,213 |
When someone join a channel, you might not have his address if he never interacted with you already. Inside event, you should always use the address available from the raw irc message, which is $wildsite (for the type 2).
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Sep 2011
Posts: 5
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Sep 2011
Posts: 5 |
That was working few versions before ;s Its an old script.
Last edited by Charus; 03/08/12 12:21 AM.
|
|
|
|
Joined: Jul 2006
Posts: 4,213
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,213 |
Like I said you were probably lucky, you had already interacted with that user. $address($nick,2) should never be used inside an event
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Sep 2011
Posts: 5
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Sep 2011
Posts: 5 |
Lucky?  You cant be lucky with that things. The thing is that $address($nick, 2) was working and now its not working.
|
|
|
|
Joined: Oct 2003
Posts: 3,918
Hoopy frood
|
Hoopy frood
Joined: Oct 2003
Posts: 3,918 |
Works fine here. You have to make sure your IAL is updated. Type /help IAL to learn how $address gets the host information-- in short, if the user was on the channel before you joined, mIRC will not be able to return anything for $address() until you /who # (or another command that gets the host of the users on the channel). This has ALWAYS been how mIRC has worked, nothing has changed in this respect.
In other words, when Wims said you were lucky, he meant that, previously, you've been using your script only on nicks that joined the channel after you did, and therefore the IAL was filled with their host information.
- argv[0] on EFnet #mIRC - "Life is a pointer to an integer without a cast"
|
|
|
|
Joined: Sep 2011
Posts: 5
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Sep 2011
Posts: 5 |
Problem solved. Somehow ial was off when mirc was starting. Probably i used '/ial on' on a script that im not using any more so the command did not executed.
Thx for the help guys.
|
|
|
|
Joined: Apr 2003
Posts: 342
Fjord artisan
|
Fjord artisan
Joined: Apr 2003
Posts: 342 |
There is no reason why $address can't fetch the address of a user if not cached. In fact it probably should do this.
Beware of MeStinkBAD! He knows more than he actually does!
|
|
|
|
Joined: Jul 2007
Posts: 1,129
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,129 |
$address($nick,2) and $wildsite are used interchangeably. The only difference is that one's longer then the other.
|
|
|
|
Joined: Dec 2002
Posts: 2,962
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,962 |
You want mIRC to freeze for potentially dozens of seconds while $address() gets the user's info from the server? No, it definitely should not do this.
Spelling mistakes, grammatical errors, and stupid comments are intentional.
|
|
|
|
Joined: Jul 2006
Posts: 4,213
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,213 |
No there are not, $address() retrieve the value from the ial, it can be $null, $wildsite is the value from the event, it always has a value ans should always be used instead of $address(,2) in an event
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Jul 2007
Posts: 1,129
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,129 |
Ok fair enough. I've always seen them both abused quite often.
|
|
|
|
Joined: Jul 2006
Posts: 4,213
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,213 |
Yeah well, unfortunatly, $address($nick,2) is often incorrectly used instead of $wildsite
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Jul 2007
Posts: 1,129
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,129 |
Now I couldn't have said it better myself.
|
|
|
|
|