phergie / phergie-irc-plugin-react-nickserv
Phergie plugin for interacting with the NickServ agent to authenticate the bot's identity
Installs: 4 754
Dependents: 0
Suggesters: 1
Security: 0
Stars: 3
Watchers: 4
Forks: 3
Open Issues: 1
Requires
Requires (Dev)
- phake/phake: ~2
- phpunit/phpunit: ~4.6
Suggests
- pschwisow/phergie-irc-plugin-react-altnick: Provides alternative nicks if the primary nick is in use; required for ghost feature
This package is not auto-updated.
Last update: 2020-03-20 16:19:09 UTC
README
This repo is being kept for posterity and will be archived in a readonly state. If you're interested it can be forked under a new Composer namespace/GitHub organization.
phergie/phergie-irc-plugin-react-nickserv
Phergie plugin for interacting with the NickServ agent to authenticate the bot's identity.
Install
The recommended method of installation is through composer.
composer require phergie/phergie-irc-plugin-react-nickserv
See Phergie documentation for more information on installing and enabling plugins.
Configuration
'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 required. See "Ghosting" below. new \PSchwisow\Phergie\Plugin\AltNick\Plugin(array( 'nicks' => /* ... */ )), )
Ghosting
This plugin has a 'ghost' feature: if the configuration option is set, and your primary nickname is in use when you join the server, it will ask NickServ to kill your primary nickname and then switch to it if the command is successful.
If you want to use this feature, then note that the NickServ plugin will not automatically change your nickname for you if your primary nickname is in use. You will need to use a different plugin, such as AltNick, to provides the server with an alternative nickname when your primary nickname is in use.
If your primary nickname is in use, and no plugin provides the server with an alternative nickname, then the server will close the connection before the NickServ plugin can attempt to regain your primary nickname.
Events
This plugin emits the following event:
Event name | Callback parameters | Emitted on |
---|---|---|
nickserv.identified |
|
Successful NickServ login |
Tests
To run the unit test suite:
curl -s https://getcomposer.org/installer | php
php composer.phar install
./vendor/bin/phpunit
License
Released under the BSD License. See LICENSE
.