I did it many years ago.
The trick was to create a mixed-mode assembly / dll and provide the necessary export. Then the exported function will call the .NET code to process the request from mirc.
I will try to see if I have a code still lying (we are talking about 8 years ago).
source share