Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   TBDev (http://www.bvlist.com/forumdisplay.php?f=20)
-   -   How I disable automatic warning for low ratio (http://www.bvlist.com/showthread.php?t=8823)

bestlap 30th January 2013 22:44

How I disable automatic warning for low ratio
 
Please help.. how I can to disable automatic warning for low ratio in TBDev 08 :sos::sos:

kiper 2nd February 2013 00:09

from /include/bittorrent.php or browse.php depends on where ist being displayed!

firefly007 2nd February 2013 03:40

Quote:

Originally Posted by bestlap (Post 39165)
Please help.. how I can to disable automatic warning for low ratio in TBDev 08 :sos::sos:

Code:

        $uped = mksize($CURUSER['uploaded']);
        $downed = mksize($CURUSER['downloaded']);
        if($CURUSER["downloaded"] > 0) {
            $ratio = $CURUSER['uploaded'] / $CURUSER['downloaded'];
            $ratio = number_format($ratio, 3);
            $ratio_1 = $ratio;
            $color = get_ratio_color($ratio);
            if($color)
                $ratio = "$ratio";
        }
        else
            if($CURUSER["uploaded"] > 0)
                $ratio = "Inf.";
            else
                $ratio = "---";

        if($CURUSER['donor'] == "yes")
            $medaldon = "donor";

        if($CURUSER['warned'] == "yes")
            $warn = "warned";

and

Code:

   
        if($ratio_1 < 0.75) {
            print ("
\n");
            print ("Warning: You have a low ratio! (< 0.75)");
            print ("
\n");
        }


bestlap 3rd February 2013 23:25

Please help... I delete this in include/cleanup
PHP Code:

// WARNINGS
function autowarn($length$limit$minratio)
{
$msg sqlesc("This is a automatic warning because your share ratio is too low at this moment.\n\nYou have " $length " days to higher your share ratio, read the rules to see what your ratio must be.\nIf your share ratio is too low after these 3 days you will be banned permanently!");
$until sqlesc(get_date_time(gmtime() + (($length+1)*86400)));
$dt sqlesc(get_date_time());
$limit $limit *1024*1024*1024;
$res mysql_query("SELECT id,ip FROM users WHERE class = 0 AND enabled = 'yes' AND downloaded > $limit AND uploaded / downloaded < $minratio and warned = 'no' and id<>2891") or sqlerr(__FILE____LINE__);
while (
$arr mysql_fetch_assoc($res))
{
mysql_query("UPDATE users SET permban = 'yes', warned = 'yes', warneduntil = ".$until." WHERE id=$arr[id]") or sqlerr(__FILE____LINE__);
mysql_query("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES(0, $arr[id]$dt$msg, 0)") or sqlerr(__FILE____LINE__);
}
}

autowarn(3,4,0.10);
autowarn(3,10,0.20);
autowarn(3,20,0.30);
autowarn(3,30,0.40); 


and no anymore warning users but the stats ot Upload and Download torrent is crazy......

I seeding 4 torrent but in traker write 8 torrent and other users is report me to this bug ?whether I am guilty ?:sos:

firefly007 6th February 2013 12:09

Quote:

Originally Posted by bestlap (Post 39257)
Please help... I delete this in include/cleanup
PHP Code:

// WARNINGS
function autowarn($length$limit$minratio)
{
$msg sqlesc("This is a automatic warning because your share ratio is too low at this moment.\n\nYou have " $length " days to higher your share ratio, read the rules to see what your ratio must be.\nIf your share ratio is too low after these 3 days you will be banned permanently!");
$until sqlesc(get_date_time(gmtime() + (($length+1)*86400)));
$dt sqlesc(get_date_time());
$limit $limit *1024*1024*1024;
$res mysql_query("SELECT id,ip FROM users WHERE class = 0 AND enabled = 'yes' AND downloaded > $limit AND uploaded / downloaded < $minratio and warned = 'no' and id<>2891") or sqlerr(__FILE____LINE__);
while (
$arr mysql_fetch_assoc($res))
{
mysql_query("UPDATE users SET permban = 'yes', warned = 'yes', warneduntil = ".$until." WHERE id=$arr[id]") or sqlerr(__FILE____LINE__);
mysql_query("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES(0, $arr[id]$dt$msg, 0)") or sqlerr(__FILE____LINE__);
}
}

autowarn(3,4,0.10);
autowarn(3,10,0.20);
autowarn(3,20,0.30);
autowarn(3,30,0.40); 

and no anymore warning users but the stats ot Upload and Download torrent is crazy......

I seeding 4 torrent but in traker write 8 torrent and other users is report me to this bug ?whether I am guilty ?:sos:

You have messed up you cleanup.php , could you give me the original cleanup.php file not the modded one.

Chez 26th February 2013 18:11

Check in bittorrent.php if you have something like this and delete it:

PHP Code:

if($ratio_1 0.75) {
            print (
"<table align=center border=0 cellspacing=0 width=95% cellpadding=5 bgcolor=red><tr><td align='center' style='padding: 5px; background: red'>\n");
            print (
"<b><font color=white>Warning: You have a low ratio! (< 0.75)</font></b>");
            print (
"</td></tr></table>\n");
        } 



All times are GMT +2. The time now is 00:41.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.