General reply. So I originally wrote this page from this discussion: http://en.wikichip.org/wiki/mirc/ipv6
Which seems about right.

Someone just reported this situation to me: if you use /server without the -6 switch to connect to an ipv6 ip address which mIRC therefore doesn't need to resolve, /sockopen will fail to resolve ipv4 addresses on that connection, so will /dns, however /dns -4 will work correctly (where the local mode using /server -6 makes /dns -4 fails). This seems to be kind of a mix of the two modes.

So mIRC is binding to an ipv6 adapter in this case, just like with the local mode, however mIRC is still able to resolve ipv4 addresses with dns -4, so mIRC is capable of resolving ipv4 addresses when binded to an ipv6 adapter, it's just that the design of /server -6 makes it so by default, it won't, but why should /dns -4 fails on a '/server -6' connection when it doesn't fail on a '/server <ipv6 address here>' connection? Perhaps I'm just not a fan of the design (either). It seems to me the -6 switch of /server only means you want to eventually connect to an ipv6 address (/server -46 some.domain.com is meant to be a thing right? where it would connect to either type of addresses), not that you want to get ipv4 to fail for that connection, I don't see the point in this.

Of course -4/6 switches for /sockopen would be useful and I'm going to request it right away, but I think the above shows there is some kind of a missing feature in the design. Using /sockopen -4 on a /server -6 connection would make it fail with the current design, and that seems to imply you do not, in any case, want to use /server -6 since it means your socket script requiring ipv4 would simply fail.
Perhaps I'm missing something but is there any reason one wouldn't want some ipv4 fallback by default, in all case, with the ability to force ipv6/ipv4 resolution with -6/-4?

I think that regardless of the -4/-6 switch, /dns and /sockopen should NOT be connection dependent like Wiz said.
Assuming you are connected to an ipv6 server (regardless of if you used -6 or if you specifiied an ipv6 ip address) on server A and to an ipv4 server on server B, and that some.domain.com can resolve to an ipv6 ip address as well as an ipv4 ip address, /scid -a /sockopen test some.domain.com 80 should work, it would connect to the ipv6 ip address on server A (because we didn't specify any switch on /sockopen, assuming they exist) and to the ipv4 ip address on server B.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel