Skip to content

Instantly share code, notes, and snippets.

@gawel
Created May 21, 2021 17:30
Show Gist options
  • Save gawel/3918dbc501749b158a5ffe4f98db9cfc to your computer and use it in GitHub Desktop.
Save gawel/3918dbc501749b158a5ffe4f98db9cfc to your computer and use it in GitHub Desktop.
import irc3
from irc3.plugins.command import Commands
class Custom:
def __init__(self, context):
self.context = context
self.command = context.get_plugin(Commands)
@irc3.event((r':(?P<mask>\S+) PRIVMSG (?P<target>\S+) '
r':{nick}:*\s+(?P<cmd>\w+)(\s(?P<data>\S.*)|(\s*$))'))
def on_command(self, cmd, **kw):
self.command.on_command(cmd, **kw)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment