mIRC Homepage
I've always wondered the exact specifics of how $mask() chooses wildcards for portions of a fulladdress. It's obviously aware when it's working with a hostname versus an IP address (v4 and v6), or something that is neither. It also seems to treat different domain names with different subdomain names differently, such as those ending with .co.uk ccTLD instead of a .net TLD.

Could you explain each mask for us, and all of those little case conditions that ultimately decides on a wildcard and its positioning?
The $mask() routine consists of 160 lines of code that have evolved over the past twenty years based on user feedback. It includes umpteen tweaks and special cases. Ye gods, there is even code in there that caters for different ircd address formats! Please excuse me a moment while I hyperventilate. Am I going to spend my time going through each line of code and converting it into readable pseudo-code that explains in excruciating detail how it all works? Hmm :-) Seriously, as with most features, the only real way to know how $mask() works is to create test cases for it in a script and to /echo the result.
Lol, well good to know!

Maybe we can hold one of those scripting competition things to suss out the definition(s) of each $mask(,N) via brute force.
© mIRC Discussion Forums