diff --git a/gazelle.sql b/gazelle.sql index fd129b60..1044ea4f 100644 --- a/gazelle.sql +++ b/gazelle.sql @@ -423,6 +423,12 @@ CREATE TABLE `ip_bans` ( KEY `ToIP` (`ToIP`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; +CREATE TABLE `lastfm_users` ( + `ID` int(10) unsigned NOT NULL, + `Username` varchar(20) NOT NULL, + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + CREATE TABLE `library_contest` ( `UserID` int(10) NOT NULL, `TorrentID` int(10) NOT NULL, diff --git a/sections/schedule/index.php b/sections/schedule/index.php index d6da5861..24dfe2ba 100644 --- a/sections/schedule/index.php +++ b/sections/schedule/index.php @@ -307,7 +307,7 @@ function next_hour() { $Message = 'You have downloaded more then 10 GiB while on Ratio Watch. Your leeching privileges have been disabled. Please reread the rules and refer to this guide on how to improve your ratio https://what.cd/wiki.php?action=article&id=110'; foreach($UserIDs as $UserID) { Misc::send_pm($UserID,0,db_string($Subject),db_string($Message)); - send_irc("PRIVMSG #reports : !leechdisabled Downloaded 10 GB+ on Ratio Watch. https://".NONSSL_SITE_URL."/user.php?id=$UserID"); + send_irc("PRIVMSG #reports : !leechdisabled Downloaded 10 GB+ on Ratio Watch. https://what.cd/user.php?id=$UserID"); } $DB->query("UPDATE users_info AS i JOIN users_main AS m ON m.ID=i.UserID @@ -462,7 +462,7 @@ function next_hour() { Tracker::update_tracker('update_user', array('passkey' => $Passkey, 'can_leech' => '1')); } - + /* // Put user on ratio watch if he doesn't meet the standards sleep(10); $DB->query("SELECT m.ID, m.Downloaded FROM users_info AS i JOIN users_main AS m ON m.ID=i.UserID @@ -487,7 +487,7 @@ function next_hour() { Misc::send_pm($UserID, 0, db_string("You have been put on Ratio Watch"), db_string("This happens when your ratio falls below the requirements we have outlined in the rules located [url=http://".NONSSL_SITE_URL."/rules.php?p=ratio]here[/url].\n For information about ratio watch, click the link above."), ''); echo "Ratio watch on: $UserID\n"; } - + */ sleep(5); //------------- Rescore 0.95 logs of disabled users @@ -504,7 +504,7 @@ function next_hour() { sleep(5); //------------- Disable downloading ability of users on ratio watch - + /* $UserQuery = $DB->query("SELECT ID, torrent_pass FROM users_info AS i JOIN users_main AS m ON m.ID=i.UserID WHERE i.RatioWatchEnds!='0000-00-00 00:00:00' @@ -539,6 +539,7 @@ function next_hour() { foreach($Passkeys as $Passkey) { Tracker::update_tracker('update_user', array('passkey' => $Passkey, 'can_leech' => '0')); } + */ //------------- Disable inactive user accounts --------------------------// sleep(5); @@ -935,11 +936,11 @@ function next_hour() { Misc::send_pm($UserID, 0, db_string('Unseeded torrent notification'), db_string($MessageInfo['Count']." of your uploads will be deleted for inactivity soon. Unseeded torrents are deleted after 4 weeks. If you still have the files, you can seed your uploads by ensuring the torrents are in your client and that they aren't stopped. You can view the time that a torrent has been unseeded by clicking on the torrent description line and looking for the \"Last active\" time. For more information, please go [url=https://what.cd/wiki.php?action=article&id=663]here[/url].\n\nThe following torrent".($MessageInfo['Count']>1?'s':'')." will be removed for inactivity:".$MessageInfo['Msg']."\n\nIf you no longer wish to receive these notifications, please disable them in your profile settings.")); } } - - $DB->query("UPDATE staff_pm_conversations + + $DB->query("UPDATE staff_pm_conversations SET Status = 'Resolved', ResolverID = '0' WHERE Date < NOW() - INTERVAL 1 MONTH AND Status = 'Open' AND AssignedToUser IS NULL"); - + } /*************************************************************************\ //--------------Run twice per month -------------------------------------// diff --git a/sections/torrents/browse2.php b/sections/torrents/browse2.php index 0a812cda..30337c8c 100644 --- a/sections/torrents/browse2.php +++ b/sections/torrents/browse2.php @@ -425,7 +425,7 @@ function header_link($SortKey,$DefaultWay="desc") { } } -if (!empty($_GET['freetorrent'])) { +if (!empty($_GET['freetorrent']) || $_GET['freetorrent'] === '0') { switch ($_GET['freetorrent']) { case 0: // Only normal freeleech $SphQL->where('freetorrent', 0); diff --git a/sections/upload/upload_handle.php b/sections/upload/upload_handle.php index d3377422..436afe08 100644 --- a/sections/upload/upload_handle.php +++ b/sections/upload/upload_handle.php @@ -630,8 +630,8 @@ } // Use this section to control freeleeches -$T['FreeLeech'] = 1; -$T['FreeLeechType'] = 1; +$T['FreeLeech'] = 0; +$T['FreeLeechType'] = 0; // Torrent $DB->query("