mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-23 11:27:24 +08:00
announce left check
This commit is contained in:
@@ -73,6 +73,7 @@ $lang_staffpanel = [
|
||||
'Manage custom fields' => '管理自定義的字段',
|
||||
'Search user' => '搜索用戶',
|
||||
'Confirm user' => '確認用戶',
|
||||
'Confirm user to complete registration' => '確認用戶以完成注冊',
|
||||
'Add Attendance card' => '增加補簽卡',
|
||||
'Add Attendance card to certain classes' => '為特定等級用戶增加補簽卡',
|
||||
'Add Bonus/Attend card/Invite/upload' => '增加魔力/補簽卡/邀請/上傳量',
|
||||
|
||||
@@ -193,6 +193,13 @@ if ($torrent['approval_status'] != \App\Models\Torrent::APPROVAL_STATUS_ALLOW &&
|
||||
}
|
||||
}
|
||||
|
||||
if ($left > $torrent['size']) {
|
||||
//disable download
|
||||
(new \App\Repositories\UserRepository())->updateDownloadPrivileges(null, $userid, 'no', 'fake_announce');
|
||||
do_log(sprintf("fake announce, user: %s, torrent: %s, announce left: %s > size: %s", $userid, $torrentid, $left, $torrent['size']), 'warn');
|
||||
warn("fake announce");
|
||||
}
|
||||
|
||||
// select peers info from peers table for this torrent
|
||||
|
||||
$numpeers = $torrent["seeders"]+$torrent["leechers"];
|
||||
|
||||
@@ -23,6 +23,10 @@ return [
|
||||
'subject' => 'Download permission canceled',
|
||||
'body' => 'Your download permission has been cancelled due to announce to paid torrent too many times, please make sure you have enough bonus.' ,
|
||||
],
|
||||
'download_disable_fake_announce' => [
|
||||
'subject' => 'Download permission canceled',
|
||||
'body' => 'Your download permission has been cancelled due to announce fake data.',
|
||||
],
|
||||
'download_enable' => [
|
||||
'subject' => 'Download permission restored',
|
||||
'body' => 'Your download privileges restored, you can now download torrents. By: :operator',
|
||||
|
||||
@@ -23,6 +23,10 @@ return [
|
||||
'subject' => '下载权限取消',
|
||||
'body' => '你因向付费种子汇报失败次数过多下载权限被取消,请确保你有足够的魔力。',
|
||||
],
|
||||
'download_disable_fake_announce' => [
|
||||
'subject' => '下载权限取消',
|
||||
'body' => '你因虚假汇报下载权限被取消。',
|
||||
],
|
||||
'download_enable' => [
|
||||
'subject' => '下载权限恢复',
|
||||
'body' => '你的下载权限恢复,你现在可以下载种子。By: :operator',
|
||||
|
||||
@@ -22,6 +22,10 @@ return [
|
||||
'subject' => '下载权限取消',
|
||||
'body' => '你因向付費種子匯報失敗次數過多下載權限被取消,請確保你有足夠的魔力。',
|
||||
],
|
||||
'download_disable_fake_announce' => [
|
||||
'subject' => '下载权限取消',
|
||||
'body' => '你因虛假匯報下載權限被取消。',
|
||||
],
|
||||
'download_enable' => [
|
||||
'subject' => '下載權限恢復',
|
||||
'body' => '你的下載權限恢復,你現在可以下載種子。By: :operator',
|
||||
|
||||
Reference in New Issue
Block a user