The request to send a message looks like this:
Code:
POST /message/compose HTTP/1.1
Host: www.twitch.tv
Connection: keep-alive
Content-Length: 166
Pragma: no-cache
Cache-Control: no-cache
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Origin: http://www.twitch.tv
User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.35 Safari/537.36
Content-Type: application/x-www-form-urlencoded
Referer: http://www.twitch.tv/message/compose
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8
Cookie: unique_id=xxxxxxxxxxxxxx; __qca=xxxxxxxxxxxxxxx; language=en; persistent=xxxxxxxxxxxxxxxxx; api_token=xxxxxxxxxxxxxxxx; last_login=2015-01-31+13%3A36%3A48+UTC; _twitch_session_id=xxxxxxxxxxxx; mp_xxxxxxxxxxxxxx_mixpanel=%7B%22distinct_id%22%3A%20%22xxxxxxxxxxxxxxxxxxxx%22%2C%22; login=membear; name=Membear; csrf_token=xxxxxxxxxxxxxxxxxxx; __utmli=send

utf8=%E2%9C%93&authenticity_token=xxxxxxxxxxxxxxx%3D&to_login=touser&message%5Bsubject%5D=moo&message%5Bbody%5D=moo


So good luck grabbing the csrf_token and the rest of the cookies. This can be done by reading the cookies of a browser that's already been logged in, or logging in through sockets with mirc itself and keeping all the cookies.