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

1. Go to this page and download the library: Download phergie/phergie-irc-plugin-react-nickserv 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-nickserv example snippets


'plugins' => array(
    new \Phergie\Irc\Plugin\React\NickServ\Plugin(array(

        // Required: password used to authenticate with NickServ
        'password' => 'YOUR-NICKSERV-PASSWORD-HERE',

        /* Everything else is optional! */

        // NickServ's nickname
        'botnick' => 'NickServ',

        // Whether or not to attempt to "ghost" the primary nick if it's in use
        'ghost' => false,

        // Regex pattern matching a NickServ notice asking for identification
        'identifypattern' => '/This nickname is registered/',

        // Regex pattern matching a NickServ notice indicating a successful login
        'loggedinpattern' => '/You are now identified/',

        // Regex pattern matching a NickServ notice indicating the nickname has been ghosted
        'ghostpattern' => '/has been ghosted/',
    )),

    // If 'ghost' is true, an alternative nickname plugin is 

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