Obviously if Winsock provides what is needed, then you should of course be using winsock - but I suspect that there may be issues in the way mIRC uses winsock for IPv4/IPv6 for non-IRC connections particularly when server connection is IPv6.

There certainly seem to be two or three networking issues in this particular case. These could be due to the users home router configuration having something small wrong with it - or it could be mIRC doing something wrong - or both.

ISSUE 1. User has mIRC automatically connecting to irc.irchighway.net when mIRC starts using Connect at Startup rather than a script. The user is NOT issuing a /server -6 command manually or via a script and mIRC is NOT set to use IPv4 by default.

I do NOT have IPv6 internet connectivity, just IPv4. When I do an nslookup on irc.irchighway.net I get:
Code
Non-authoritative answer:
Name:    irc.irchighway.net
Addresses:  2001:41d0:8:9403::1
          81.169.242.139


When I do /dns I get the following:
Code
/dns irc.irchighway.net
* Dns resolving irc.irchighway.net
* Dns resolved irc.irchighway.net to 81.169.242.139
/dns -4 irc.irchighway.net
* Dns resolving irc.irchighway.net
* Dns resolved irc.irchighway.net to 81.169.242.139
/dns -6 irc.irchighway.net
* Dns resolving irc.irchighway.net
* Dns unable to resolve address irc.irchighway.net
/dns -46 irc.irchighway.net
* Dns resolving irc.irchighway.net
* Dns resolved irc.irchighway.net to 81.169.242.139


When the user with IPv6 connectivity does the same they get
Code
/dns irc.irchighway.net
* Dns resolving irc.irchighway.net
* Dns resolved irc.irchighway.net to 2001:41d0:8:9403::1
/dns -4 irc.irchighway.net
* Dns resolving irc.irchighway.net
* Dns resolved irc.irchighway.net to 66.207.167.12
/dns -6 irc.irchighway.net
* Dns resolving irc.irchighway.net
* Dns resolved irc.irchighway.net to 2001:41d0:8:9403::1
/dns -46 irc.irchighway.net
* Dns resolving irc.irchighway.net
* Dns resolved irc.irchighway.net to 2001:41d0:8:9403::1, 66.207.167.12


This is the case whether the user is connected to IRC or not.

There appears to be an issue here - I am expecting /dns to return the same results for /dns and /dns -46 but it doesn't. Since user has NOT got IPv6 set as priority, I would expect server connection to be IPv4, but it is IPv6 probably for the same reason that /dns returns only IPv6 addresses.

When you don't have IPv6 internet connectivity I would still personally expect to see IPv6 DNS entries returned like nslookup but I can live with that not happening.

2. A slightly different issue (which might have the same cause) is when you try to connect to a different server that is only IPv4.

When I do an nslookup on raw.githubusercontent.com I get:
Code
Non-authoritative answer:
Name:    github.map.fastly.net
Addresses:  151.101.128.133
          151.101.192.133
          151.101.0.133
          151.101.64.133
Aliases:  raw.githubusercontent.com


User with IPv6 gets:
Code
/dns raw.githubusercontent.com
* Dns resolving raw.githubusercontent.com
* Dns unable to resolve address raw.githubusercontent.com
/dns -4 raw.githubusercontent.com
* Dns resolving raw.githubusercontent.com
* Dns resolved raw.githubusercontent.com to 151.101.0.133, 151.101.128.133, 151.101.64.133, 151.101.192.133
/dns -6 raw.githubusercontent.com
* Dns resolving raw.githubusercontent.com
* Dns unable to resolve address raw.githubusercontent.com
/dns -46 irc.irchighway.net
* Dns resolving raw.githubusercontent.com
* Dns resolved raw.githubusercontent.com to 151.101.0.133, 151.101.128.133, 151.101.64.133, 151.101.192.133


Same issue of /dns only doing /dns -6 not /dns -46 but in this case it breaks the connectivity completely.

So there seem to be two potential network issues here:

a. /dns is not the same as /dns -46 and it should be.

b. Presumably sometimes /dns is currently equivalent to /dns -4 and sometimes equivalent to /dns -6 - but no idea what is causing it to be equivalent to /dns -6 when user has NOT got IPv6 prioritised.