Skip to content

Dcc send files #212

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

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

Conversation

JasonWMcKee
Copy link

Added DCC functionality to core

Description

Added the ability to send files with the DCC protocol.

Test Plan

I created I quick plugin

from cardinal.decorators import command, help

# File to be sent
FILE_PATH = "/tmp/test.txt"

class DCCSendPlugin:
    """Plugin to handle !sendfile command and send a file via DCC SEND."""

    @command(["sendfile"])
    def send_file(self, cardinal, user, channel, msg):
        """Sends /tmp/test.txt to the requesting user via DCC SEND."""
        cardinal.senddccfile(user, FILE_PATH)
        cardinal.sendMsg(channel, f"{user}: Sending test.txt via DCC SEND.")

entrypoint = DCCSendPlugin

Contribution Checklist

@JasonWMcKee
Copy link
Author

I just realized I should have tested large files to ensure the timeout doesn't supersede the transfer

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.

2 participants