If I recall correctly, at one time mIRC did store more than nine characters for the user string, however due to bug reports relating to that behaviour mIRC was changed to comply with the maximum length.
I agree with this approach, but just in case it makes a difference I should say that my tests with mIRC show that it allows userids up to 10 characters.
I can't remember the reason for the original bug report unfortunately apart from the fact that there were side-effects on some IRC networks when the maximum length was not enforced.
While I could revert this change, this will result in the same issue that users reported years ago that led to this change in the first place.
As I said, I think mIRC should enforce 9 or 10 characters on the Options/Ident page.
$mask() was made to work this way based on input from users who were having issues with servers that could not handle long userids. Anything beyond 9 characters is chopped to nine characters and prefixed with a wildcard.
As I said, $address(nick,5) correctly handles userids of 10 characters. If I set my userid to ABCDEFGHIJ (10 characters), $address(,5) gives nick!ABCDEFGHIJ@host and $address(,6) gives nick!*BCDEFGHIJ@host.
mIRC did follow this - it originally had no limit. However, as different server implementations used different methods, and were affected in different ways by userids longer than nine characters, there was no other way to prevent these issues.
As stated, mIRC should only allow users to set a limited length userid, but I don't see how handling longer ones in $address(,5/6) would cause an incompatibility.
If you can provide a step by step method of reproducing this issue, so that I can see where it is being inconsistent, I will try to reproduce it here. Note that any further changes will need to chop the userid to 9 characters.
1. Set DCC Get autoaccept from trusted users.
2. Connect to irchighway, join #ebooks.
3. /whois dragnbreaker
4. //echo -a $address(dragnbreaker,5)
5. //echo -a $ial(dragnbreaker)
3. /dcc trust $address(dragnbreaker,5)
4. In #ebooks, send "!dragnbreaker Canavan, Trudi - Age of the Five 01 - Priestess of the White (v5.0).epub"
File should be auto-accepted, but it won't be.
According to ctcp VERSION, dragnbreaker is running mIRC 6.35.
IMO, $ial(nick) is correct (IAL should hold the full mask), and $address(nick,5 or 6) should be fixed to use the full userid. I don't believe that this will create any significant backward compatibilities, but will create consistency.
Creating consistency by keeping $address as-is and changing everything else is both a much bigger job and likely to lead to significant backwards compatibility.