goshuirc / bnc

a simple irc bouncer written in go
https://goshubnc.org/
MIT License
17 stars 3 forks source link

Proposed method of handling Caps from a client #25

Closed prawnsalad closed 7 years ago

prawnsalad commented 7 years ago

We currently have bnc<>ircd caps, and now this handles client<>ircd caps. Any capabilities can be added to the BNC core via capabilities.go in a single function. away-notify example is included.

This runs any messages sent to or from a client through any cap handlers that have registered themselves to process them. In case of the away-notify example, if the client does not support away-notify but the bnc<>ircd does, then AWAY messages to the client will be dropped. Cap handlers also have the opportunity to modify the message if needed.

Questions: