mIRC Homepage
Posted By: phrozenfire DCC Sending from a Socket Bot - 20/09/03 03:10 PM
I have a socket bot that's connected to IRC. I'm wondering, how can I initiate a DCC send from the bot to somebody else. Also, how could I cancel the DCC send, and retrieve information about DCC sends. Thanks.
Posted By: Online Re: DCC Sending from a Socket Bot - 21/09/03 04:28 AM
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.
© mIRC Discussion Forums