The Hostmasks plugin allows one to retrieve banmasks for users, useful for nested commands. No longer in active development.