cooper / juno

a seriously modern IRC daemon written from scratch in Perl. designed to be ridiculously extensible, painlessly reloadable, and excessively configurable
https://juno.mitchellcooper.me
ISC License
15 stars 4 forks source link

mode parameter formatting and parsing #169

Closed cooper closed 7 years ago

cooper commented 7 years ago

it should be possible to store mode parameters internally in an arbitrary format. formatters may be used to convert them to protocol-specific stringified forms suitable for transfer. parsers may be used to convert their stringified forms to the arbitrary format used internally.

cooper commented 7 years ago

this could be implemented using an event. a mode module may provide a default callback, which stringifies the parameter for rfc2812. other protocol callbacks will be called before the default one and stop the event propagation.