8000 Helga plugins should receive keyword arguments · Issue #85 · shaunduncan/helga · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Helga plugins should receive keyword arguments #85
Open
@shaunduncan

Description

@shaunduncan

Right now any decorated plugins end up checking *args to determine what action they are receiving (i.e. len(args) == 2 for commands). This is wrong. All plugin types have the same base argument list (client, channel, nick, message) so keyword arguments should be used instead. Something like:

@command('foo')
def foo(client, channel, nick, message, **kwargs):
    cmd, args = kwargs['cmd'], kwargs['args']

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0