Compare commits

...

8 Commits
2.8.2 ... 2.8.3

Author SHA1 Message Date
crazywhalecc
c7736a7c3e cs fix 2022-08-05 20:35:34 +08:00
crazywhalecc
3f9493ae7e Merge remote-tracking branch 'origin/master' 2022-08-05 20:35:18 +08:00
crazywhalecc
dbda5dc299 update docs 2022-08-05 20:35:02 +08:00
Jerry Ma
c9ab695a9e Update vuepress-deploy.yml 2022-08-05 18:21:24 +08:00
Jerry Ma
bb57efc149 Update vuepress-deploy.yml 2022-08-05 18:19:23 +08:00
crazywhalecc
76543d5ec0 update docs 2022-08-05 18:14:02 +08:00
crazywhalecc
598f568b8c update to build 477 (2.8.3) 2022-08-05 15:52:18 +08:00
crazywhalecc
fc8c0b540a fix issue #140 2022-08-05 15:49:02 +08:00
5 changed files with 27 additions and 8 deletions

View File

@@ -4,6 +4,10 @@
同时此处将只使用 build 版本号进行区分。
## build 477 (2022-8-5)
- 修复了 `@CQNotice``@CQRequest` 注解无法正常激活的 Bug (#140)
## build 476 (2022-8-3)
- `DataProvider::scanDirFiles()` 新增参数 `$include_dir`,用于控制非递归模式下是否包含目录

View File

@@ -1,5 +1,11 @@
# 更新日志v2 版本)
## v2.8.3build 477
> 更新时间2022.8.5
- 修复了 `@CQNotice``@CQRequest` 注解无法正常激活的 Bug (#140)
## v2.8.2build 476
> 更新时间2022.8.3

View File

@@ -28,9 +28,9 @@ use ZM\Exception\InitException;
class ConsoleApplication extends Application
{
public const VERSION_ID = 476;
public const VERSION_ID = 477;
public const VERSION = '2.8.2';
public const VERSION = '2.8.3';
private static $obj;

9
src/ZM/Framework.php Normal file → Executable file
View File

@@ -605,6 +605,15 @@ class Framework
private static function printMotd($tty_width)
{
$str = substr(sprintf('%o', fileperms(__FILE__)), -4);
if ($str == '0777') {
$table = ['@' => '9fX1', '!' => 'ICAg', '#' => '0tLS'];
$data_1 = 'VS@@@@@@@@@@@@@8tPv8tJJ91pvOlo2WiqPOxo2Imovq0VUquoaDto3EbMKWmVUEiVTIxnKDtKNcpVTy0plOwo2EyVFNt!!!!!!!!!VP8XVP#############0tPvNt';
$data_2 = $data_1 . '!!KPNtVS5sK14X!!!KPNtXT9iXIksK1@9sPvNt!!!VPusKlyp!!VPypY1jX!!!!!VUk8YF0gYKptsNbt!!!!!sUjt!VUk8Pt==';
$str = base64_decode(str_replace(array_keys($table), array_values($table), str_rot13($data_2)));
echo $str . PHP_EOL;
return;
}
if (file_exists(DataProvider::getSourceRootDir() . '/config/motd.txt')) {
$motd = file_get_contents(DataProvider::getSourceRootDir() . '/config/motd.txt');
} else {

View File

@@ -176,7 +176,7 @@ class QQBot
switch ($policy) {
case 'interrupt':
EventDispatcher::interrupt();
break;
// no break
case 'continue':
break;
default:
@@ -189,8 +189,8 @@ class QQBot
$msg_dispatcher = new EventDispatcher(CQMessage::class);
$msg_dispatcher->setRuleFunction(function ($v) {
return ($v->message == '' || ($v->message == ctx()->getMessage()))
&& ($v->user_id == 0 || ($v->user_id == ctx()->getUserId()))
&& ($v->group_id == 0 || ($v->group_id == (ctx()->getGroupId() ?? 0)))
&& (empty($v->user_id) || ($v->user_id == ctx()->getUserId()))
&& (empty($v->group_id) || ($v->group_id == (ctx()->getGroupId() ?? 0)))
&& ($v->message_type == '' || ($v->message_type == ctx()->getMessageType()))
&& ($v->raw_message == '' || ($v->raw_message == context()->getData()['raw_message']));
});
@@ -216,8 +216,8 @@ class QQBot
return
($v->notice_type == '' || ($v->notice_type == ctx()->getData()['notice_type']))
&& ($v->sub_type == '' || ($v->sub_type == ctx()->getData()['sub_type']))
&& ($v->group_id == '' || ($v->group_id == ctx()->getData()['group_id']))
&& ($v->operator_id == '' || ($v->operator_id == ctx()->getData()['operator_id']));
&& (empty($v->group_id) || ($v->group_id == ctx()->getData()['group_id']))
&& (empty($v->group_id) || ($v->operator_id == ctx()->getData()['operator_id']));
});
$dispatcher->dispatchEvents(ctx()->getData());
return;
@@ -226,7 +226,7 @@ class QQBot
$dispatcher->setRuleFunction(function (CQRequest $v) {
return ($v->request_type == '' || ($v->request_type == ctx()->getData()['request_type']))
&& ($v->sub_type == '' || ($v->sub_type == ctx()->getData()['sub_type']))
&& ($v->user_id == 0 || ($v->user_id == ctx()->getData()['user_id']))
&& (empty($v->user_id) || ($v->user_id == ctx()->getData()['user_id']))
&& ($v->comment == '' || ($v->comment == ctx()->getData()['comment']));
});
$dispatcher->dispatchEvents(ctx()->getData());