cinchrb / cinch

The IRC Bot Building Framework
http://www.rubydoc.info/gems/cinch
MIT License
1k stars 180 forks source link

No simple way to override IRC#on_396 #179

Closed farcaller closed 9 years ago

farcaller commented 9 years ago

I need to set a handler on that and it's not trivial, as bot creates IRC instance implicitly. Is it possible to add event firing on on_396 or provide a better way for bot to use subclassed IRC instance?

dominikh commented 9 years ago

You cannot override Cinch's behaviour for 396, but you can register your own handler for doing whatever you want. on "396" {|m| ...} if using on handlers, or listen_to :"396" if using plugins.