|
@@ -742,7 +742,7 @@ class Torrents {
|
742
|
742
|
* @param int $FreeNeutral 0 = normal, 1 = fl, 2 = nl
|
743
|
743
|
* @param int $FreeLeechType 0 = Unknown, 1 = Staff picks, 2 = Perma-FL (Toolbox, etc.), 3 = Vanity House
|
744
|
744
|
*/
|
745
|
|
- public static function freeleech_torrents($TorrentIDs, $FreeNeutral = 1, $FreeLeechType = 0) {
|
|
745
|
+ public static function freeleech_torrents($TorrentIDs, $FreeNeutral = 1, $FreeLeechType = 0, $Announce = true) {
|
746
|
746
|
if (!is_array($TorrentIDs)) {
|
747
|
747
|
$TorrentIDs = array($TorrentIDs);
|
748
|
748
|
}
|
|
@@ -768,7 +768,7 @@ class Torrents {
|
768
|
768
|
G::$Cache->delete_value("torrent_download_$TorrentID");
|
769
|
769
|
Misc::write_log((G::$LoggedUser['Username']??'System')." marked torrent $TorrentID freeleech type $FreeLeechType");
|
770
|
770
|
Torrents::write_group_log($GroupID, $TorrentID, (G::$LoggedUser['ID']??0), "marked as freeleech type $FreeLeechType", 0);
|
771
|
|
- if ($FreeLeechType == 1 || $FreeLeechType == 3) {
|
|
771
|
+ if ($Announce && ($FreeLeechType == 1 || $FreeLeechType == 3)) {
|
772
|
772
|
send_irc('PRIVMSG '.BOT_ANNOUNCE_CHAN.' FREELEECH - '.site_url()."torrents.php?id=$GroupID / ".site_url()."torrents.php?action=download&id=$TorrentID");
|
773
|
773
|
}
|
774
|
774
|
}
|