Send CAP REQ :twitch.tv/commands over IRC and receive you’ll receive whispers in this format:
:twitch_username!twitch_username@twitch_username.tmi.twitch.tv WHISPER your_name :message
Keep in mind most IRC frameworks don’t natively support a WHISPER command so you may have to parse the raw lines sent by the server.