8000 restore some kind of global callback functionality · Issue #76 · ergochat/irc-go · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
restore some kind of global callback functionality #76
Open
@slingamn

Description

@slingamn

thoj/ircevent (which we forked from) allowed passing * as the command name to AddCallback, in which case the callback would apply to all events. I removed this when I forked because I didn't see a clear use case at the time.

Possibilities:

  1. Restore some version of star callbacks. (In the case where a common handler is used for all commands, with internal logic for reading (*ircmsg.Message).Command, this DRY's the enumeration of the possible commands between AddHandler and the handler itself.)
  2. Add a separate callback handler that takes the raw IRC bytes from the wire, rather than a parsed message (e.g. for implementing a raw traffic log)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0