No Clean Feed - Stop Internet Censorship in Australia

nmanzi’s tech ramblings

.NET development, Sharepoint, Office System and tech-in-general.

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.

You can download my script here: Austnet DCC Allow CTCP Trigger Script

Extract the script and place it into 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.

Full code after the jump.

- NM

AustnetDCCAllowTrigger.scpt

using terms from application "Colloquy"
 
	on process subcode request command with args from user on conn
		if command is "DCCALLOW" then
			send raw command ("dccallow +" &amp; user's name) to conn
			tell user
				send message ("DCC Allow request accepted")
			end tell
			return true
		end if
 
	end process subcode request
 
end using terms from
Found this interesting? Share it:
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Reddit
  • Slashdot
  • Technorati
  • Live
  • TwitThis

This entry was posted on Tuesday, August 26th, 2008 at 3:38 am and is filed under Development, Random. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

1 Comment so far

  1. For those using mIRC, here’s the same thing as a “remote” script.

    ctcp *:dccallow:?:/dccallow + $+ $nick

Have your say

Fields in bold are required. Email addresses are never published or distributed.

Some HTML code is allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="">
URIs must be fully qualified (eg: http://www.domainname.com) and all tags must be properly closed.

Line breaks and paragraphs are automatically converted.

Please keep comments relevant. Off-topic, offensive or inappropriate comments may be edited or removed.