#!/usr/bin/env php \n", basename($argv[0])); } if (isfifo($argv[1])) { file_put_contents($argv[1], $argv[2]); } else { $bot = new Client($argv[1], function($bot) { $bot->send($_SERVER["argv"][2]); }); $bot->getSession()->onNumeric = function($origin, $event) use ($bot) { if ($event == \irc\client\RPL_ENDOFNAMES) { $bot->getSession()->disconnect(); } }; $bot->getSession()->run(); } # vim: noet