Below is the OmniService class that any service we want to use in our program needs to extend. Mainly it needs to provide a way of getting messages and sending messages.
It actually took a while to figure out how to do make this this simple. The message itself is below
Last but not least the Hub class. The Hub class actually took a lot of work. I tried developing this project before and the whole thing became too unwieldy to continue and I had to find a new route. The Hub is the controller (In the MVC sense) for the whole program. It's pretty small but it took a lot of planning and re-planning to get it that small and if I wasn't coding this whole thing by myself I probably wouldn't have put so much time into making this so small but I needed it to be manageable. I replaced the old controller with more of a message router and by doing that reduced a lot of code I had to write. Any startup functions I needed were outsourced to a script that ran, a happy byproduct of the way messages worked was they could be stored in a text file, essentially creating a scripting language with no extra effort.