I might be wrong but to me it would seem that you are at speed hammering away building yourself the wheel.
Have you considered just taking over control of the application (mirc) on the machine its running on, or the whole machine it on.

XP and W2K have terminal services, which is very good for this, and from memory i beleive W9x has netmeeting that woell allow a aplication takeover.

Sorry if im pointing you in the wrong direction.