internal void SendRequestedNotify(DccReceiveArgs args) { if (SendRequested != null) { SendRequested(args); } }
private void HandleSend(IrcUser user, string[] args) { try { string filename = args[0]; IPAddress addr = Util.GetTcpAddress(Convert.ToInt64(args[1])); int port = Convert.ToInt32(args[2]); long size = Convert.ToInt32(args[3]); var endPoint = new IPEndPoint(addr, port); var receiveInfo = new DccReceiveArgs(user, filename, endPoint, size); SendRequestedNotify(receiveInfo); if (receiveInfo.Accept) { StartReceive(user, new FileInfo(receiveInfo.FileName), endPoint, size, receiveInfo.Timeout); } } catch (Exception) { HandleInvalid(user, "SEND", args); } }
private void HandleSend(IrcUser user, string[] args) { try { string filename = args[0]; IPAddress addr = Util.GetTcpAddress(Convert.ToInt64(args[1])); int port = Convert.ToInt32(args[2]); long size = Convert.ToInt32(args[3]); var endPoint = new IPEndPoint(addr, port); var receiveInfo = new DccReceiveArgs(user, filename, endPoint, size); SendRequestedNotify(receiveInfo); if (receiveInfo.Accept) StartReceive(user, new FileInfo(receiveInfo.FileName), endPoint, size, receiveInfo.Timeout); } catch (Exception) { HandleInvalid(user, "SEND", args); } }
internal void SendRequestedNotify(DccReceiveArgs args) { if (SendRequested != null) SendRequested(args); }