hello lafouine022,
today i will test and get results for that.
thank you very much for your special help.
greetz ecke
Bump: So i have tested with the following edit in line 9 & 10:
Quote:
$seedT = 2 * 60 * 60; /// add your temp = hour ex: temp * 60 *60
$Tcomp = TIMENOW - 86400; /// 86400 sec for 1 day
|
result:
user downloaded 1 torrent.
seeding it for i.e. hours.
after that i stopped seeding.
Bump: User is in List TS Hit & Run Detection Tool round about 2-3 h after he stopped seeding.
but after that nothing more happens. ((
Bump:
Quote:
Originally Posted by lafouine022
the first file is a test!
OK adjustement this exemple detect
seed 24h on 1 week after leech /torrent
edit line 9 and 10
PHP Code:
<?php
if ( !defined( "IN_CRON" ) )
{
exit( );
}
//////hit and run by fouini FIX/////////////////
require INC_PATH . '/functions_pm.php';
$seedT = 24 * 60 * 60; /// add your temp = hour ex: temp * 60 *60
$Tcomp = TIMENOW - 604800; /// 604 800 sec for 1 week
$query = mysql_query ('SELECT s.id, s.torrentid, s.userid, s.seedtime, t.name, u.username FROM snatched s INNER JOIN torrents t ON (s.torrentid=t.id) INNER JOIN users u ON (s.userid=u.id) WHERE s.finished = \'yes\' and t.banned = \'no\' and s.uploaded < s.downloaded and s.seedtime < '.$seedT.' and UNIX_TIMESTAMP(s.completedat) < \'' . $Tcomp . '\'') or sqlerr(__FILE__,__LINE__);
while ($HR = mysql_fetch_assoc ($query))
{
$subject = 'Hit and run detect';
$msg = 'Vous avez pas Seeder ce torrent assez lomgtemps : [URL=details.php?id=' . $HR['torrentid'] . ']' . htmlspecialchars ($HR['name']) . '[/URL] . [URL=userdetails.php?id=' . $HR['userid'] . ']1 Avertisement[/URL] vous a ete ajouter!';
send_pm ($HR['userid'], $msg, $subject, 0);
mysql_query( "DELETE FROM snatched WHERE id = ".$HR['id']."" );
mysql_query( "UPDATE users SET timeswarned = timeswarned + 1 WHERE id = ".$HR['userid']."" );
mysql_query( "INSERT INTO ts_hit_and_run (userid, torrentid, added) VALUES ('".$HR['userid']."','".$HR['torrentid']."','".TIMENOW."')");
}
//////////
?>
ps: if you want you can do a verification by day or hour by adding the code between / / / / / / and / / / in another file include/cron/files
|
i´ve tested this weekly_cleanups.php
it seems that it doesn´t work correctly.