DCC connections

DCC stands for Direct Client to Client, and it is a method of transferring files and setting up an uninterruptible chat connection between you and someone else. DCC is subject to some limitations and complications due to the common use of firewalls, routers and wireless access points like AirPort.

The initial messages to establish the DCC connection are sent via normal IRC messages, but once the connection is established it is independent of IRC, and can remain even after you disconnect from the IRC server.

Normally, when you browse the web or send email everything works pretty much transparently even if you use a firewall, router or wireless access. That's because everyone agrees on the addresses and ports used by these services, and because you act as a client to the web server or the email server. However, DCC lies outside these areas and it's unfortunately up to you to configure your internet connection to make it work. There are two sides to DCC; you either act as a client and make outgoing connections, or as a server where your make your machine wait for incoming connections.

Being a client usually works without problems. That's when you receive a file that someone sends to you or accept a DCC chat request from someone else.

Being a server requires some configuration in almost all cases except the most simple. That's when you want to send a file or initiate a DCC chat connection. If your internet connection is simple dialup to the internet it's most likely to just work.

However, if you have a high speed connection you have a little box called a DSL modem or router that sits between your computer and the phone line. This box is almost always set up to block incoming connections and to allocate your computer a private internet address (an IP address). A private internet address is not reachable from the outside. This is called NAT or Network Address Translation. An AirPort or other wireless connection does the same thing. In this case the router or AirPort base station uses the public IP address.

When you try to send a file, you are taking the role of a server and your IRC program will tell the other side which internet address and port he should attempt to connect to. The DCC preference panel allows you to set Snak up to use the correct public internet address and port range.

If you think this could get complicated, you are right. You might ask "Why doesn't DCC send just work, just like everything else ? "

The answer is that DCC send is not like everything else. A DCC send makes the program act like a server, not a client. There is no way the IRC program can know the details of your particular internet setup or configure your firewall to accept incoming connections.

DCC list inside the profile list

You can monitor your ongoing DCC Connections in the profile list which can be opened with either Cmd-D or Cmd-K. If you use Cmd-D it will preselect the DCC item at the top and give you access to the DCC buttons. The list contains each DCC connection, and provides details of the progress of the transfers.

When you have a DCC item selected the profile list will have buttons to accept or close a particular incoming DCC connection.

Accepting incoming offers

When someone attempts to open a DCC connection to you, either for chat or filetransfer, Snak will display the offer under the DCC item in the profile list so that you can either accept or reject it.

In addition to choosing the DCC offers under the DCC item in the profile list and pressing Get or Chat you can also type "/DCC Get" with an optional nickname. If you do not specify a nickname, the program will accept the first of the currently waiting DCC offers.

You can use an Action to automatically accept incoming DCC offers.
To automatically accept certain offers, open the Actions list and make a new Action. Select "On DCC filetransfer offer" or "On DCC chat offer" as the event.

The response will be preset to "Accept DCC filetransfer" or "Accept DCC chat".
To autoaccept DCC chat or files from a particular nick, fill out the nick field under the event popup.
To autoaccept files of a particular name or extension, fill out the filename field. The field supports wildcards, so use "*.MP3" to autoaccept all files with the MP3 extension.

If you choose the "Accept DCC filetransfer" response you can select the save location for the transfer. By default the location will be the desktop.
You can provide another save location in each DCC accept Action so that you may chose to save MP3 files in one location, pictures in another, everything else in the default location etc.
If there is a filename conflict between an existing file and an automatically received file, the new file will be renamed.

DCC Chatting

DCC Chat sessions do not pass through the network of IRC servers like normal messages do. Instead, these messages are transmitted directly between the two involved computers, which makes for a more secure connection that can not be interrupted.

The DCC Chat sessions are started via normal IRC messages, but once the connection is established is becomes independent of the IRC connection, and will not be subject to the normal IRC problems like lag and netsplit etc.

Start a DCC Chat session with someone by typing /DCC chat nickname or by pressing the Chat button in the DCC status list in the profile list.You need to select the DCC item at the top of the profile list to show the DCC buttons.

You can also start a DCC chat or filetransfer to someone by using the contextual menu in the user list or the Contacts list. Display the contextual menu by holding down the control key while clicking on a user. That will show a menu with options that include DCC chat and send.

Choosing the transfer method for a DCC file send

Normally Snak will automatically do the right thing, but there are cases where you may want to know about this subject.

In the DCC send dialog you will see a popup where you can select either MacBinary or Binary. Normally you should not make a selection as Snak has already preselected what it believes to be the best choice. This section attempts to explain what the difference is.

The correct transfer method depends on the kind of file and on the receiving computer. If you are unsure what to do, chose the Binary transfer method. It's the correct choice in most cases. Read on for a more in-depth description of the issue but don't worry if you don't understand all of it.

MacBinary is only supported on Macintosh IRC clients, so if the receiver is using a PC, the Binary transfer method should be used. To send files to someone on another Mac, the MacBinary format should be used if the files are not compressed or are known to contain resources. The safest bet is to use StuffIt to compress the files so that the resources are safely encapsulated, and use the Binary method.

MacBinary is a standard for preserving the specifics of Macintosh files when transmitted. On a PC a file is just a stream of bytes with no additional information. However, a Mac needs additional information in order to correctly display the file icon and launch the correct application when a user double clicks the file.

To do this, a Macintosh file is usually in two parts - a data fork which corresponds to a PC file, and a resource fork which has no PC counterpart. This is entirely transparent to a user when working on a Mac, but it becomes an issue when moving files back and forth between different environments.

The MacBinary standard defines how the filetype information, the data fork and the resource fork is packed together, so if the receiver is on a Macintosh, the MacBinary format should be used.

If the Binary transfer method is chosen instead it's not possible to correctly transfer certain types of files like applications, because only the data fork will be sent. If the files are raw data - like .jpg pictures, the Binary method is fine because such files typically do not contain a resources.

If you are sending files that are compressed with StuffIt or similar you can choose either format because compressed files have no resources that must be preserved.

DCC file sending

To start the transfer, you can either type /DCC send nickname full pathname
OR /DCC send nickname

If you do not provide a pathname, Snak will bring up a standard file dialog where you can select the file to send and choose the transfer method.

You can also send a file to someone by dragging its icon into the user list and releasing it onto the nick that you want to send it to, or using the contextual menu in the user list to start the file send.

In the case of a DCC chat or a query window you can also start a transfer by dragging the file in from the finder and dropping it on the text area of the window.

If you are having trouble getting DCC send to work but DCC receive works fine then the problem is probably your interenet connection. An AirPort, ADSL, cable modem or NAT router requires some configuration in order to work right. Please see the troubleshooting chapter or the top of this page for more information.

DCC file receiving

Snak can automatically detect if an incoming file is MacBinary or Binary so when receiving a file there is no need to consider the format of the file.

To accept a file that has been offered, open the DCC item in the profile list (Cmd-D), select the particular DCC connection and press the Accept button. Snak will then acknowledge the other computer that it's ready and the transfer will begin.

You can also type "/DCC Get" with an optional nick name to accept the transfer.

If you have set up an Action to automatically receive DCC file transmissions, the file will be placed in the folder that was selected.
If you manually accept an incoming file, the program will display a save file dialog where you can specify where to save the file.