Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented DCC get for downloading files. #209

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

trevarj
Copy link
Contributor

@trevarj trevarj commented Jun 12, 2020

Implement downloading DCC files.
A user sends you a DCC SEND request to send you a file, and then you can reply back and download the file.

*Does not yet support sending files or DCC CHAT (direct chatting with other user).

Overview:

  1. Server/Users sends a DCC CTCP message to us.
  2. The tiny client parses the message into a DCCRecord and store it in the client state.
  3. The tiny client tells us that we have a DCC file waiting, and shows us the command to accept and start the download.
  4. The download is stored in the configured directory. download_dir under Defaults
  5. Done.

Gif of it in action:
tiny-dcc

Closes #206

@trevarj
Copy link
Contributor Author

trevarj commented Jun 12, 2020

There's only one server that I know that uses this and it's the one referenced in #206.

Basically, you just go on there and send a command to search.
The bot messages you privately and sends you a DCC SEND, which Tiny will pick up and store in the DCC Cache. It also helpfully prints out the command to use to download the file.
Once the download is complete you get a notice in the shared server tab between you and the sender (in this case Irchighway's tab).

The download directory is configurable in config.yml.

image

libtiny_client/src/lib.rs Outdated Show resolved Hide resolved
@trevarj trevarj force-pushed the dcc-file branch 2 times, most recently from 5ff2a77 to 0bca58e Compare August 13, 2020 16:03
@osa1 osa1 force-pushed the master branch 2 times, most recently from 778be8d to 6e9b1a5 Compare September 20, 2020 16:16
@trevarj trevarj force-pushed the dcc-file branch 3 times, most recently from 5987ac4 to aafdd15 Compare March 21, 2021 11:28
Does not yet support sending files.
Closes osa1#206

Added connection timeout

Fixed NOTICE format which was causing an issue. Spawn regular task instead of local for file download.

Only read number of bytes read.
@Kabouik
Copy link

Kabouik commented Sep 11, 2021

Are there any blockers that prevent merging this?

@osa1
Copy link
Owner

osa1 commented Sep 12, 2021

@trevarj let me know if this is ready (as in it works and is complete) and has no unrelated changes, I can review this after #344.

As discussed before on IRC, a PR description with summary of the changes (both high level and in implementation) would be helpful.

@trevarj
Copy link
Contributor Author

trevarj commented Sep 12, 2021

@osa1 this one actually might be farther along than #344. I updated the description and added a gif so you can see how it works.

@travankor
Copy link

Could this be made optional for those that want to ignore DCC CTCP?

@trevarj
Copy link
Contributor Author

trevarj commented Sep 13, 2021

Could this be made optional for those that want to ignore DCC CTCP?

I can feature-gate this, if that makes more sense. @osa1 can make the final decision

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for DCC file transfers
4 participants