mIRC Options -> Connection -> Options -> Perform

Check Enable perform on connect, add a network for Twitch if it does not already exist, and then enter the following under Perform commands:

raw CAP REQ :twitch.tv/membership