Well if you're good with scripting this shouldn't be too complicated. Just familiarize yourself with the
DCC and DCC Resume (
/help dcc resume protocol) protocols and watch the debug window (
/debug @win) to see how mIRC initiates a DCC send over IRC.
Of course it's always easy to review a ready script before writing your own. If you are interested, here's a
DCC Sockbot script I wrote, that tends to completely simulate the way mIRC works.
Type
/sb <server> [port] to launch the sockbot into the specified server, and once connected it will DCC you a file. You can change the receiver nick and file name in the line starting with "_startsend". If you have any questions regarding the code you can post them below.
The DCC stuff is intentionally broken into several (internal) aliases, allowing you to easily insert them into your sockbot code if you wish.
As for canceling DCC sends and retrieving information about them, you can use the various socket manipulation commands mirc provides (
/help sockets) such as /socklist, /sockclose and $sock().properties.