I have not seen one that will do this. However, you could write one to do it..
use 'on join' to trap the mask of nicknames comming in.
write the users mask and nickname to a .txt file with
/write <filename> [text you captured]
you could then externally use sort to sort the text file created by mask (i would store mask then nick in the file and sort on first xx characters in the file)
then you would have a sorted file to work with...
It could also be done with writeini instead, and make the mask the keyword for the ini write.. this way it would have nicks for each mask by ip address (mask).
It will take some work to do all this, but with the built in /help in mirc, the script can be done...
Good luck.