ZeroKnight / ZeroBot

My personal IRC/Multi-protocol Bot created (and re-created) for education and amusement.
MIT License
1 stars 0 forks source link

Add a core event for modules being (re)loaded and available #54

Open ZeroKnight opened 3 months ago

ZeroKnight commented 3 months ago

The Core should send an event whenever either feature or protocol modules are loaded. Features might be interested in when a protocol becomes available in order to set up some protocol-specific functionality. They may also be interested in when another feature module is loaded to provide compatibility or cooperative extended features.

For example, the Chat module could set up its activity shuffler on the fly when the Discord protocol is loaded (assuming it wasn't from the start).

On loading a protocol module, send an event to both loaded features and protocols. On loading a feature module, send an event to only loaded features; protocols shouldn't be aware of features.