Replicating this seems like the most straightforward solution:
- Add a custom field to a user’s profile which can be accessed via the API, for the IRC key
- You’d maybe want a plugin to ensure random keys are created
- Create an IRC bot, which queries the API, and if the key matches, invites the user to a private channel