CTCP request handling in Colloquy

Back in the day, when mIRC and NoNameScript were my friends, I used to have a CTCP trigger set up that gave people DCC leeching from me the ability to resume transfers if they disconnected for some reason, amongst other things.

Now that I’m all Mac, I’ve been using Colloquy, and haven’t started looking at scripting for it – that is, until today.

Austnet are now blocking all DCC by default, and the only way to allow someone to send you a file is to issue the user command /dccallow +User <timeout> – adding them to a temporary Allow list. This, of course, only works if your nick is registered and you have identified with /nickop.

In order to save time and allow for the receiving of DCC file sends while I’m AFK, I did some research and found that Colloquy Plugins are the method of choice for handling CTCP requests. Plugins can be created in a variety of programming languages, like Obj-C, Applescript, F-Script, Javascript, Python and Ruby. I decided to do mine in Applescript, mainly because there’s a lot more support for Applescript plugins over the others.

Place this script in your ~/Library/Application Support/Colloquy/Plugins directory, then issue a /reload plugins in Colloquy if it’s already open. People can then use /ctcp <Your Username> DCCALLOW to allow themselves DCC access to your username for 300 seconds. Additionally, if you want to auto-accept DCC requests from strangers, you’ll need to modify your Colloquy settings to allow it.

– NM