You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As Better Chat is a fully fledged chat replacement, it seems interesting to provide other plugins a way to use BC to implement their own chat channels/servers (this is completely unrelated to other plugins I am developing, of course). This is sort of similar in spirit to #53, but should allow plugins to have more flexibility to act as a controller for how messages are passed in an out of a channel.
When the hook is acquired, the plugin should consider that a new chat channel was created, akin to being connected to a server in the current version. Then, the dependant plugin can write incoming messages to the channel by calling methods on the hook and they should be sent to all listeners to display. Conversely, sent text messages will be routed from BC to the external plugin with the channel sink call.
This current implementation was thought out to work like a mutex, so that only one plugin controls the chat at once. Another possibility could be to create a new tab for each created channel to allow multiple channels to exist simultanously.
I have implemented a prototype version to test out how it could work. Some internal refactorings will need to be made to ChatLineInfo to adapt to arbitrary input, then it should be a matter of passing down parameters from ChatWindow and ChatLine.
The text was updated successfully, but these errors were encountered:
As Better Chat is a fully fledged chat replacement, it seems interesting to provide other plugins a way to use BC to implement their own chat channels/servers (this is completely unrelated to other plugins I am developing, of course). This is sort of similar in spirit to #53, but should allow plugins to have more flexibility to act as a controller for how messages are passed in an out of a channel.
A simple API implementation example could be:
When the hook is acquired, the plugin should consider that a new chat channel was created, akin to being connected to a server in the current version. Then, the dependant plugin can write incoming messages to the channel by calling methods on the hook and they should be sent to all listeners to display. Conversely, sent text messages will be routed from BC to the external plugin with the channel sink call.
This current implementation was thought out to work like a mutex, so that only one plugin controls the chat at once. Another possibility could be to create a new tab for each created channel to allow multiple channels to exist simultanously.
I have implemented a prototype version to test out how it could work. Some internal refactorings will need to be made to
ChatLineInfo
to adapt to arbitrary input, then it should be a matter of passing down parameters fromChatWindow
andChatLine
.The text was updated successfully, but these errors were encountered: