mIRC Home    About    Download    Register    News    Help

Print Thread
#263564 21/08/18 07:40 PM
Joined: Jan 2004
Posts: 2,127
maroon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
It would be useful to have something that validates and encodes/decodes ipv6 addresses, somewhat similar to the way $longip() handles ipv4's.

Perhaps something that takes $longipv6(string, [e|d]) and either encodes a 128-bit number into the compressed format, or decodes vice versa.

A useful feature would be to use it to validate if a string is a valid ipv6 string by $longipv6(string,d).validate returning $null if it's invalid, or $true/$false. The regex to match ipv6 addresses is very long and complex.

maroon #263565 21/08/18 07:43 PM
Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
+1

It is very useful for validation as $longip() is for IPV4.


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
westor #263599 25/08/18 10:38 AM
Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Actually i've found a workaround (thanks to jaytea) for this, but is not sure that will work in all the cases, it needs a lot of tests, btw it would be nice something like this would be implement into mIRC by default.


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-

Link Copied to Clipboard