ZeroKnight / ZeroBot

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

Events for config changes #18

Closed ZeroKnight closed 3 years ago

ZeroKnight commented 3 years ago

Knowing when config keys change is useful for keeping module functionality correct, such as the size of the deque that Chat uses to avoid recently used phrases. Add some events that cover different instances of config changes.

Add an event called config_changed whose payload contains the following:

This event will be fired when only a single key is changed.

Add an event called config_reloaded whose payload contains the following:

This event will be fired when an entire config is changed, i.e. when it is reloaded, or despite its name, when it is reset (conceptually the same thing).