Skip to content

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