/** * Injects the bot's client into the plugin if it implements * \Phergie\Irc\Bot\React\ClientAwareInterface. * * @param \Phergie\Irc\Bot\React\PluginInterface $plugin Loaded plugin * @param \Phergie\Irc\Bot\React\Bot $bot Bot that loaded the plugin */ public function process(PluginInterface $plugin, Bot $bot) { if ($plugin instanceof ClientAwareInterface) { $plugin->setClient($bot->getClient()); } }