To get the resolver to choose IPv6 first, then fall back to IPv4:
family inet6 inet4
Put this in /home/znc/etc/resolv.conf to force ZNC to use IPv6 first.
/home/znc/etc/resolv.conf