1
0
Fork 0
mirror of https://github.com/fluffle/goirc synced 2025-05-13 02:53:19 +00:00

Add an overridable Dispatcher to Conn, and use that to dispatch events.

This commit is contained in:
Alex Bramley 2011-07-27 21:35:45 +01:00
parent 900afb5c48
commit 8e6de2f3c7
3 changed files with 15 additions and 12 deletions

View file

@ -36,6 +36,10 @@ func NewHandler(h func(...interface{})) Handler {
return &basicHandler{h, NewHandlerID()}
}
type EventDispatcher interface {
Dispatch(name string, ev...interface{})
}
type EventRegistry interface {
AddHandler(name string, h Handler)
DelHandler(h Handler)