View Single Post
  #6  
Old 13th July 2013, 01:27
lafouine022 lafouine022 is offline
Senior Member
 
Join Date: Feb 2010
P2P
Posts: 120
Wink
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$subject0);
        
        
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

Last edited by lafouine022; 14th July 2013 at 09:24.
Reply With Quote
The Following 2 Users Say Thank You to lafouine022 For This Useful Post:
eckeO5 (14th July 2013), Marco (16th July 2013)