mIRC Home    About    Download    Register    News    Help

Print Thread
#259553 22/12/16 04:33 PM
Joined: Jul 2006
Posts: 4,141
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,141
When the IP address passed to /dns does not resolve to an hostname, /dns reports that it resolved the ip to.. that ip.
Code:
/dns 2a02:214b:8125:8e00:bc56:8788:2655:52f3
Quote:
[21:39:45] * Dns resolving 2a02:214b:8125:8e00:bc56:8788:2655:52f3
[21:39:45] * Dns resolved 2a02:214b:8125:8e00:bc56:8788:2655:52f3 to 2a02:214b:8125:8e00:bc56:8788:2655:52f3
If this is expected, then the help file should be updated.

Others strange things with /dns (try it on a connected server):

Code:
/dns ~westor@Swift-EAD07A2A.dsl.dynv6.forthnet.gr
Quote:
[21:57:28] * /dns: no such user ~westor@Swift-EAD07A2A.dsl.dynv6.forthnet.gr
The help file says that if there is a ., it recognizes it as an hostname and try to resolve, so it shouldn't think it's an user here. Remove both the ~ and the @, and now mIRC try to resolve it as an hostname.

Code:
/dns aegeagjo@!@..
Quote:
[22:02:34] * Dns unable to resolve address !@..
Basically recognizing email address and trying to resolve the domain, but none of this is documented, so that's a bug as far as I'm concerned.

Last edited by Wims; 22/12/16 09:09 PM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #259790 26/01/17 08:45 PM
Joined: Dec 2002
Posts: 5,408
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,408
Thanks, the first issue has been fixed for the next version. The other issue is due to mIRC performing a basic check on the parameter to decide whether it is a hostname or a nickname. Since they can contain similar characters, mIRC just performs a very basic check for combinations of alphanumeric, ., and - characters. The routine does not check for !@ as it is only expecting a hostname or a nickname.

Khaled #259793 27/01/17 01:03 AM
Joined: Jul 2006
Posts: 4,141
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,141
Right, I saw your original reply saying it was fixed and thought that would mean a '.' in the parameter would be taken as an hostname, but with you editing the post, I now take it the check performed isn't going to be fixed?


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #259797 27/01/17 07:17 AM
Joined: Dec 2002
Posts: 5,408
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,408
I tested this and it seems to be working. If I /dns test and /dns test.com, it correctly treats the first as a nickname and the second as a hostname.

If the characters in the parameter are alphanumeric, include . or -, it is treated as hostname, otherwise it is treated as nickname.

Your example is a nickname!username@hostname combination, so mIRC cannot know whether you want it to use the nickname portion to resolve the address or the hostname portion. However, I could extend /dns to support this format and make it use the nickname by default, and if -h is used, to use the hostname. Is this what you are requesting?

Khaled #259800 27/01/17 10:28 AM
Joined: Jul 2006
Posts: 4,141
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,141
It's correct for parameter such as "test" and "test.com" but the fulladdress format isn't being handled according to the description of the help file that's what bother me the most. I was thinking that if there is a . regardless of the format recognized, it would be taken as an hostname, for that reason, I think it should give priority to the hostname when a '.' is found, that's what I was requesting

/dns nickname!username@host.name - hostname
/dns nickname!username@hostname - user
/dns -h nickname!username@hostname - hostname

Of course that would break backward comp but that's fine for a buggy behavior imo.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #259801 27/01/17 10:59 AM
Joined: Dec 2002
Posts: 5,408
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,408
That's right, the /dns command has never supported a full address in a nickname!username@hostname format. When this feature was added, users requested that it resolve an address in the form of a hostname or look up the address from the server using a nickname.

Wims #259810 28/01/17 11:10 AM
Joined: Dec 2002
Posts: 5,408
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,408
Right, I have extended /dns to support nick!user@host format. If /dns sees !@ characters in the parameter, it will parse it as a nick!user@host format and if there is a "host", with no wildcards, it will resolve it. If there is no "host" or it includes a wildcard, it will use "nick" to look up the host, unless there is no "nick" or "nick" includes a wildcard, in which case it will give up and use the whole parameter as a nick. This should maintain backwards compatibility with older scripts.


Link Copied to Clipboard