PHP code example of phergie / phergie-irc-plugin-react-autojoin

1. Go to this page and download the library: Download phergie/phergie-irc-plugin-react-autojoin library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

phergie / phergie-irc-plugin-react-autojoin example snippets


return array(
    'plugins' => array(

        new \Phergie\Irc\Plugin\React\AutoJoin\Plugin(array(

            // Required: list of channels to join
            'channels' => '#channel1,#channel2,#channelN',
            // or
            'channels' => array('#channel1', '#channel2', '#channelN'),

            // Optional: channel keys
            'keys' => 'key1,key2,keyN',
            // or
            'keys' => array('key1', 'key2', 'keyN'),

            // Optional: if true, doesn't join channels until
            // the NickServ plugin has successfully logged in
            'wait-for-nickserv' => true,

        )),

        // If wait-for-nickserv is enabled, the NickServ plugin must also be used
        new \Phergie\Irc\Plugin\React\NickServ(array(
            /* .... */
        )),

    ),
);

curl -s https://getcomposer.org/installer | php
php composer.phar install
./vendor/bin/phpunit