Add a new class, Phergie\Irc\Bot\React\PluginProcessor\ClientInjector, that implements PluginProcessorInterface and injects an instance of ClientAwareInterface into the plugin it receives.
Once this work is done, a plugin should be able to implement the ClientAwareInterface interface, receive the Phergie\Irc\Client\React\ClientInterface instance in use by the Phergie\Irc\Bot\React\Bot instance, and make use of its reconnection support.
While phergie/phergie-irc-client-react supports reconnecting, there's no way to access that functionality from a plugin for phergie/phergie-irc-bot-react. Add this support via a plugin processor.
Phergie\Irc\Bot\React\ClientAwareInterface
, that is equivalent toEventEmitterAwareInterface
for an instance ofPhergie\Irc\Client\React\ClientInterface
.Phergie\Irc\Bot\React\PluginProcessor\ClientInjector
, that implementsPluginProcessorInterface
and injects an instance ofClientAwareInterface
into the plugin it receives.ClientInjector
to the list of plugin processors inBot->getDefaultPluginProcessors()
.Once this work is done, a plugin should be able to implement the
ClientAwareInterface
interface, receive thePhergie\Irc\Client\React\ClientInterface
instance in use by thePhergie\Irc\Bot\React\Bot
instance, and make use of its reconnection support.