Sends a list of all plugins' commands to the requesting user.
Plugins don't know about other plugins; the only way for them to communicate
with the outside world is by unidirectionally leaving messages in
IRCPluginState.messages
(and related arrays).
As such, we cannot from a plugin query other plugins for their
IRCEventHandler.Command-annotated
functions, by design. Plugins should be self-contained.
To work around this we construct a delegate that accepts associative arrays of
IRCPlugin.CommandMetadata,
and leave them as a message. These are constructed at compile-time based on
the event handlers in a plugin module.
The main event loop will then gather
IRCPlugin.CommandMetadatas
from all plugins and invoke the delegate with these "commands" arrays as argument.
Once we have the list we format it nicely and send it back to the requester.
Sends a list of all plugins' commands to the requesting user.
Plugins don't know about other plugins; the only way for them to communicate with the outside world is by unidirectionally leaving messages in IRCPluginState.messages
(and related arrays).
As such, we cannot from a plugin query other plugins for their IRCEventHandler.Command-annotated functions, by design. Plugins should be self-contained.
To work around this we construct a delegate that accepts associative arrays of IRCPlugin.CommandMetadata, and leave them as a message. These are constructed at compile-time based on the event handlers in a plugin module.
The main event loop will then gather IRCPlugin.CommandMetadatas from all plugins and invoke the delegate with these "commands" arrays as argument.
Once we have the list we format it nicely and send it back to the requester.