src/DCC/DCCTransfer.cs
/// <summary>
/// Accept the incoming DCC file request.
/// </summary>
/// <param name="Filename">The path and file name where the incoming file is to be saved.</param>
/// <param name="Action">What to do in case the file already exist.</param>
Accept the incoming DCC file request.
Accept the incoming DCC file request .
public void Accept(string Filename, DCCTransferFileExist Action)
		{
			strLocalFile = Filename;
			if (File.Exists(Filename))
			{
				switch (Action)
				{
					case DCCTransferFileExist.Resume:
						FileInfo fileInfo = new FileInfo(Filename);
						base.CurrentConnection.SendData("PRIVMSG " + base.Nick + " :\x01" + "DCC RESUME " + strRemoteFile + " " + base.Identifier.ToString() + " " + fileInfo.Length.ToString() + "\x01");
						return;
					case DCCTransferFileExist.Ignore:
						return;
					case DCCTransferFileExist.Overwrite:
						File.Delete(Filename);
						break;
				}
			}
			base.EtablishConnection();
		}
public void Accept ( string Filename , DCCTransferFileExist Action ) { strLocalFile = Filename ; if ( File . Exists ( Filename ) ) { switch ( Action ) { case DCCTransferFileExist . Resume : FileInfo fileInfo = new FileInfo ( Filename ) ; base . CurrentConnection . SendData ( " " + base . Nick + " \x01 " + " " + strRemoteFile + " " + base . Identifier . ToString ( ) + " " + fileInfo . Length . ToString ( ) + " \x01 " ) ; return ; case DCCTransferFileExist . Ignore : return ; case DCCTransferFileExist . Overwrite : File . Delete ( Filename ) ; break ; } } base . EtablishConnection ( ) ; }
Accept the incoming DCC file request.
Accept the incoming DCC file request .
Filename
string
The path and file name where the incoming file is to be saved.
The path and file name where the incoming file is to be saved .
Action
DCCTransferFileExist
None