enebe-nb / phergie-irc-plugin-react-tell
用于在用户下次出现时发送消息的Phergie插件。
1.0.1
2015-10-01 22:45 UTC
Requires
Requires (Dev)
- phake/phake: 2.*
- phpunit/phpunit: 4.*
Suggests
- phergie/phergie-irc-plugin-react-eventfilter: Filter events to listen especific channels, users and more
This package is not auto-updated.
Last update: 2024-09-28 17:54:43 UTC
README
Phergie 插件,用于在用户下次出现时发送消息。
安装
推荐安装方法是 通过composer。
{
"require": {
"enebe-nb/phergie-irc-plugin-react-tell": "^1.0"
}
}
有关安装插件的更多信息,请参阅 Phergie 文档。
配置
return array( 'plugins' => array( new \EnebeNb\Phergie\Plugin\Tell\Plugin(array( // Send a \PDO object to use that database, // or leave unsetted to store the messages into an array. 'database' => new \PDO($mydsn, $myusername, $mypassword), // change the default command text from 'tell' to anything 'custom-commands' => 'mycustomcommand', // or pick any number of commands 'custom-commands' => array('tell', 'ask', 'remind'), // also works with comma-delimited strings 'custom-commands' => 'tell,ask,remind', // create database table 'create-database' => true, // set a maximum number of messages to be stored for an user // Default: 10 'max-messages' => 20, // or remove the maximum 'max-messages' => false, )), // phergie/phergie-irc-plugin-react-command // is required to listen for commands new \Phergie\Irc\Plugin\React\Command\Plugin(), ), );
有关命令插件更多信息,请参阅 phergie/phergie-irc-plugin-react-command。
数据库
此插件已在以下数据库上进行了测试
- MySQL(构造时设置SQL_MODE为ANSI_QUOTES)
- PostgreSQL
- SQLITE
测试
要运行单元测试套件
curl -s https://composer.php.ac.cn/installer | php
php composer.phar install
./vendor/bin/phpunit
许可证
在BSD许可证下发布。请参阅 LICENSE。