|
楼主 |
发表于 2024/10/17 22:13
|
显示全部楼层
|Google Chrome 109.0.0.0 |Windows 10
对比announce.php,基本不变,只是在最后加VIP不计下载量与种子认领
- if (count($updateset)) // Update only when there is change in peer counts
- {
- $updateset[] = "visible = 'yes'";
- $updateset[] = "last_action = $dt";
- sql_query("UPDATE torrents SET " . join(",", $updateset) . " WHERE id = $torrentid");
- }
- if($client_familyid != 0 && $client_familyid != $az['clientselect']){//20221119
- $USERUPDATESET[] = "clientselect = ".sqlesc($client_familyid);
- }
- /**
- * VIP do not calculate downloaded
- * @since 20221119
- */
- if ($az['class'] == UC_VIP) {
- foreach ($USERUPDATESET as $key => $value) {
- if (preg_match("/downloaded/i", $value)) {
- unset($USERUPDATESET[$key]);
- }
- }
- }
- if(count($USERUPDATESET) && $userid)
- {
- sql_query("UPDATE users SET " . join(",", $USERUPDATESET) . " WHERE id = ".$userid);
- //种子认领20181127
- //sql_query("UPDATE my_torrents_claim SET m_up=m_up+".($trueupthis+0)." ,m_down=m_down+".(0+$truedownthis)." ,m_seedtime=m_seedtime+".($self['announcetime']+0)." WHERE torrent_id = $torrentid and user_id = $userid");
- //20181210new
- sql_query("UPDATE my_torrents_claim SET m_up=m_up+".($trueupthis+0)." ,m_down=m_down+".(0+$truedownthis)." WHERE torrent_id = $torrentid and user_id = $userid");
-
- }
- if($userid)
- {
- //20181210种子认领做种时间
- //20181210 update 20181211
- $m_res = @mysql_fetch_array(@sql_query("SELECT uploaded,downloaded,started,last_action,prev_action FROM peers WHERE torrent=$torrentid AND seeder ='yes' AND userid=" . sqlesc($userid)));
- $prev_action = strtotime($m_res['prev_action']);
- if($prev_action>0){
- $m_seedtime = strtotime($m_res['last_action'])-strtotime($m_res['prev_action']);
- sql_query("UPDATE my_torrents_claim SET m_seedtime=m_seedtime+".($m_seedtime+0)." WHERE torrent_id = $torrentid and user_id = $userid");
- }else{
- $m_seedtime = strtotime($m_res['last_action'])-strtotime($m_res['started']);
- sql_query("UPDATE my_torrents_claim SET m_seedtime=m_seedtime+".($m_seedtime+0)." WHERE torrent_id = $torrentid and user_id = $userid");
- }
-
- }
- benc_resp_raw($resp);
复制代码
不是切换IP,要客户端同时有2个IP才汇报数据翻倍的 |
|