TinaTiel / obs-chatbot

GNU General Public License v3.0
3 stars 0 forks source link

Client Interface -- Common Operations #51

Closed TinaTiel closed 3 years ago

TinaTiel commented 3 years ago

As part of #40 (possibly as a pre-req), I've noticed there's common operations such as:

I also want to be able to view in one place what clients are registered and what state they're each in -- for example, to verify OBS is connected or Twitch auth is working. So there should also exist operations such as:

TinaTiel commented 3 years ago

This is now fixed in the queue system. Each client has its own "state" queue. QueueClients put Events into the queue, and QueueNotifiers watch for new items in the queue and notify listeners registered with them. The ClientManager is itsself a Listener registered to a QueueNotifer, and it also produces messages as a QueueClient. Third party pieces such as the ListenerAdapter in the PircBotX (IRC) library can also act as QueueClients, sending Events into the state queue for the ClientManager to react to -- there is no limit on listeners that can be registered, the only constraint atm is being careful to not introduce loops.