Closed blinsay closed 9 years ago
This is good. I think an improvement would be if we just had a function like:
func newListener(re *regexp.Regexp,
cb func(Message, []string) Response,
config map[string]interface{})
that would query the config for the "excludes" optional member and build the set from there. What do you think? That would simplify the plugin callbacks quite a bit, make only one newListener method necessary, and even though the API would change a bit, it would become more easily extensible later (imagine supporting an "includeOnly" option as well in the future)
lol hi collon
THREAD NECROMANCY
Tweak the internal listener struct so that listeners can ignore a set of channels. Changes the exposed methods on
Gobot
so there's now aListenForExcluding
in addition toListenFor
.