<?php

/************************************************************
* Tracker configuration
*
* Please read the comments before changing anything!
* Database configuration: see secrets.inc.php
**************************************************************/

define (CLIENT_AUTH_IP, 0);
define (CLIENT_AUTH_PASSKEY, 1);

define (PASSKEY_USE_PARAM, 0);
define (PASSKEY_USE_SUBDOMAIN, 1);

define (DOWNLOAD_REWRITE, 0);
define (DOWNLOAD_ATTACHMENT, 1);


/************************************************************
* Global settings
**************************************************************/

// Set this to FALSE, if you have to do some time consuming maintenance
$GLOBALS["SITE_ONLINE"] = TRUE;



// Maximum size for uploaded .torrent files, default is 2 MB
$GLOBALS["MAX_TORRENT_SIZE"] = 2048 * 1024;

// Reannounce interval suggested to clients.
// Do not set this lower than about 20 minutes, since some clients
// do not honour this value, and rather do their reannounces at 30 minute
// intervals. This would result in concurrent timeouts for these peers.
$GLOBALS["ANNOUNCE_INTERVAL"] = 60 * 20;

// Minimum votes necessary to rate a torrent
$GLOBALS["MINVOTES"] = 1;

// Max users on site
$GLOBALS["MAX_USERS"] = 2000;
$GLOBALS["MAX_INVITES"] = 3000;
// Use IP or PassKey method for user authentication
// Valid values are CLIENT_AUTH_IP and CLIENT_AUTH_PASSKEY
$GLOBALS["CLIENT_AUTH"] = CLIENT_AUTH_PASSKEY;

// PassKey source, either by parameter "passkey=...", or by
// subdomain "http://passkey.tracker.net/announce.php"
// Use subdomain, if you have access to wildcard subdomains,
// but not mod_rewrite
$GLOBALS["PASSKEY_SOURCE"] = PASSKEY_USE_PARAM;

// Download method being used by the tracker to publish .torrent files.
// If you use themod_rewrite method, set this to DOWNLOAD_REWRITE, since
// this solution is most compatible. Otherwise, set it to DOWNLOAD_ATTACHMENT.
$GLOBALS["DOWNLOAD_METHOD"] = DOWNLOAD_ATTACHMENT;

// Set this to FALSE to deactivate dynamic RSS feed via rss.php
$GLOBALS["DYNAMIC_RSS"] = TRUE;

/************************************************************
* Limits
*************************************************************/

// Maximum size of files uploaded into the BitBucket in bytes
$GLOBALS["MAX_UPLOAD_FILESIZE"] = 256 * 1024;

// Maximum size of the BitBucket per user in bytes
$GLOBALS["MAX_BITBUCKET_SIZE_USER"] = 1024 * 1024;

// Maximum size of the BitBucket for uploaders in bytes
$GLOBALS["MAX_BITBUCKET_SIZE_UPLOADER"] = 5 * 1024 * 1024;

// Number of categories displayed per row in torrent browser
$GLOBALS["BROWSE_CATS_PER_ROW"] = 5;

// Wait time only for leechers
// Be careful, as it is possible to cheat with the wait time if set to TRUE
$GLOBALS["ONLY_LEECHERS_WAIT"] = FALSE;

// Disallow leeching even if the wait time for a torrent is disabled
// Be careful, as it is still possible to cheat if set to TRUE
$GLOBALS["NOWAITTIME_ONLYSEEDS"] = FALSE;

// Rules for wait time
// Format is Max.Ratio:Max.UpGigs:Regtime:Waittime|...
// Regtime format is [#w][#d] or 0 and * for infinite, e.g.: 2w, 2w3d, 5d
// If no rule does match, the wait time is 0, otherwise the highest wait time
// of any rule that matches counts.
$GLOBALS["WAIT_TIME_RULES"] = "0.0:0:0:0|0.0:0:0:0|0.0:0:0:0|0.0:0:0:0";

// Rules for torrent limitation
// Format is Ratio:UpGigs:SeedsMax:LeechesMax:AllMax|...
// Ratio and UpGigs are "minimum" requirements.
$GLOBALS["TORRENT_RULES"] = "0:0:10:2:12|1.01:5:10:3:13|2.01:20:10:4:14";

// Maximum number of different IP addresses for each passkey/user
$GLOBALS["MAX_PASSKEY_IPS"] = 5;

// Threshold for ratio faker tool detection. If you allow root seeding,
// consider setting this so a high value, e.g. 9 MB/sec
$GLOBALS["RATIOFAKER_THRESH"] = 3072 * 3072;
$GLOBALS["RATIOFAKER_THRESH_WEBSEED"] = 10240 * 1024;
$GLOBALS["RATIOFAKER_THRESH_VDSL"] = 10240 * 1024;

// Alwas perfom a "deep" cleanup. On small trackers, you can set
// this to TRUE, but on large trackers with lots of torrents, you
// should set this to FALSE and do deep cleanups by running
//      docleanup.php?deep=1
// as a moderator or higher ranked user.
$GLOBALS["ALWAYS_DEEP_CLEAN"] = TRUE;


/************************************************************
* Timeout settings and intervals
*************************************************************/

// Max dead torrent timeout (days)
// Time after which torrents with 0 peers are marked as dead (invisible)
$GLOBALS["MAX_DEAD_TORRENT_TIME"] = 0;

// Max torrent TTL (days, 0 to disable)
// Time after which torrents are automatically deleted
$GLOBALS["MAX_TORRENT_TTL"] = 28;

// Max signup timeout (hours)
// Time given to an user to activate his/her account
$GLOBALS["SIGNUP_TIMEOUT"] = 48;

// Max inactive timeout (days)
// Period of inactivity/no logins after an user is deleted
$GLOBALS["INACTIVE_TIMEOUT"] = 352;

// Max disabled timeout (days)
// Period of time after a disabled user is deleted
$GLOBALS["DISABLED_TIMEOUT"] = 170;

// Lock timeout for forum threads (days, 0=disabled)
// Forum threads where last post was made x days ago will be locked
$GLOBALS["THREAD_LOCK_TIMEOUT"] = 7;

// Autoclean interval (seconds)
// Time between torrent and user cleanups. If the tracker suffers
// from high load, consider setting this to a higher value.
$GLOBALS["AUTOCLEAN_INTERVAL"] = 1800 ;

// Maximum personal message prune time (days, 0=disabled)
// Personal messages are getting deleted after this number of days,
// regardless of any user setting for PM folders.
$GLOBALS["PM_PRUNE_DAYS"] = 0;
// Unter dieser Ratio wird ein user verwarnt ;)
// Im hier gezeigten Beispiel wird der User verwarnt wenn er unter 0.2 ist :)
$GLOBALS["AUTO_WARN_MIN_RATIO"] = 0.6;

// Jeder User unter der oben gezeigten Ratio und mit einem Download von
// in diesem Beispiel 2 GB wird verwarnt :) (ANGABEN IN GB)
$GLOBALS["AUTO_WARN_DOWN"] = 8;

// Länge der Verwarnung die eintritt wenn die Werte von oben zutreffen
// (Angaben in Wochen x*7) in diesem Fall 2 Wochen
$GLOBALS["AUTO_WARN_LÄNGE"] = 2;

// Jeder automatisch verwarnte User der eine Ratio >= 0.6 hat dem wird die Verwarnung entfernt
// In diesem Beispiel ist es bei 0.6 Ratio
$GLOBALS["AUTO_REM_MIN_RATIO"] = 0.6;

//Automatischer Ban wenn ein User mehr als 8GB geleecht hat
$GLOBALS["AUTO_BAN_DOWN"] = 8;

//Und dabei nicht mal eine Ratio von über 0.2 hat :)
$GLOBALS["AUTO_BAN_MIN_RATIO"] = 0.2;

/************************************************************
* Path and URL settings
*
* Paths are relative to index.php or absolute if beginning
* with / (or X:\ in Windows)
* All paths must not end with a trailing slash if not
* otherwise stated!
*************************************************************/

// Path where .torrent files are stored
// This path MUST NOT be publicly available. The download
// script takes care of delivering the files to users.
// Webserver MUST have write permission on this directory!
// No trailing slash.
$GLOBALS["TORRENT_DIR"] = "torrents";

// Path where all Bit-Bucket files are stored. These are:
// User's files, torrent and NFO images
// This path MUST be a subdir of the tracker root, and MUST be
// publicly available, optionally with referrer check
// Webserver MUST have write permission on this directory!
// No trailing slash.
$GLOBALS["BITBUCKET_DIR"] = "bitbucket";

// Relative or absolute URL where all images for the interface are stored.
// MUST include a trailing slash!
$GLOBALS["PIC_BASE_URL"] = "pic/";

// Relative or absolute URL to the portal, if it exists. Leave blank
// to hide the portal links.
$GLOBALS["PORTAL_LINK"] = "http://url";

// Valid tracker announce URLs
// The first entry will be displayed on the upload page
$GLOBALS["ANNOUNCE_URLS"] = array();
$GLOBALS["ANNOUNCE_URLS"][] = "http://url/announce.php";
$GLOBALS["ANNOUNCE_URLS"][] = "http://url/announce.php";

// Announce URL with passkey placeholder
$GLOBALS["PASSKEY_ANNOUNCE_URL"] = "http://url/announce.php?passkey={KEY}";

if ($_SERVER["HTTP_HOST"] == "")
    $_SERVER["HTTP_HOST"] = $_SERVER["SERVER_NAME"];
$GLOBALS["BASEURL"] = "http://" . $_SERVER["HTTP_HOST"];
if ($_SERVER["SERVER_PORT"] != 80)
    $GLOBALS["BASEURL"] .= ":".$_SERVER["SERVER_PORT"];

// Set this to your site URL, if automatic detection won't work
$GLOBALS["DEFAULTBASEURL"] = "http://url";

// Array containing all domains which are used to reach the tracker
// This array is used in the redirector script to determine the type of redirect
// Do not add "http://" in front of the domain, and no trailing slash
$GLOBALS["TRACKERDOMAINS"] = array();
$GLOBALS["TRACKERDOMAINS"][] = "http://url/";
$GLOBALS["TRACKERDOMAINS"][] = "http://url/";
$GLOBALS["TRACKERDOMAINS"][] = "server ip";

// Set this to true to make this a tracker that only registered users may use
// Setting this to FALSE is currently not supported, sorry!
$GLOBALS["MEMBERSONLY"] = TRUE;

// Email for sender/return path.
$GLOBALS["SITEEMAIL"] = "noreply@url";

$GLOBALS["SITENAME"] = "djbrocken~grab it,and seed it~";


/************************************************************
* Shoutcast server settings
*************************************************************/

// Set to FALSE to disable Shoutcast plugin
$GLOBALS["ENABLESHOUTCAST"] = TRUE;

// Radio title
$GLOBALS["RADIOTITLE"] = " Power Radio";

// Hostname and port of your Shoutcast server
$GLOBALS["SC_HOSTNAME"] = "ip";
$GLOBALS["SC_PORT"] = "8000";

// Username and password for your SC admin account
$GLOBALS["SC_USERNAME"] = "admin";
$GLOBALS["SC_PASSWORD"] = "pass";

// Connection timeout
// If the Shoutcast server does not run, the HTTP request
// will freeze script execution for this amount of time.
// Better disable the plugin if your server is down, or start
// the SC server immediately. This means the sc_serv process
// running or not, NOT the stream online/offline status!
$GLOBALS["SC_HTTPTIMEOUT"] = 2;






/************************************************************
 * IRC network settings
 *************************************************************/

// Set this to FALSE if you don't have an IRC channel
$GLOBALS["IRCAVAILABLE"] = TRUE;

// Title of your IRC network, e.g. "Abjects", leave blank if there is no web page
$GLOBALS["IRCNETWORKTITLE"] ="url";

// Web page of your IRC network, leave blank if there is no web page
$GLOBALS["IRCNETWORKWEB"] = "url";

// Hostname of the IRC server or hub
$GLOBALS["IRCHOST"] = "irc url";

// Port of the IRC server or hub
$GLOBALS["IRCPORT"] = "port";

// Channel to join, leave blank to display channel list to users
$GLOBALS["IRCCHANNEL"] = "channel";

// Alternate nickname prefix (if nick is already in use)
$GLOBALS["IRCALTNICK"] = "MyNick";


/************************************************************
 * Ban settings
 *************************************************************/

// Badwords in email addresses, matches everywhere
$GLOBALS["EMAIL_BADWORDS"] = array(
    "sofort-mail",
    "dfgh",
    "spamgourmet",
    "trash-mail",
    "gmail",
    "rocketmail",
    "mailinator",
    "spammotel",
    "fakemail",
    "germanmail",
    "discardmail",
    "spacemail",
    "mail.ru",
    "mytrashmail",
    "jetable",
    "spam.la",
    // DynDNS.org Hosts anfang
    "mytrashmail.com",
    "homeip",
    "ath.cx",
    "blogdns",
    "dnsalias",
    "dvrdns",
    "dynalias",
    "dyndns",
    "game-host.org",
    "game-server.cc",
    "getmyip.com",
    "gotdns",
    "ham-radio-op.net",
    "homedns",
    "homeftp",
    "homelinux",
    "homeunix",
    "is-a-geek",
    "isa-geek",
    "kicks-ass",
    "merseine.nu",
    "mine.nu",
    "myphotos.cc",
    "podzone",
    "serveftp",
    "servegame",
    "shacknet.nu",
    // DynDNS.org Hosts ende
);

// Array of banned peer ids. Match is done only at the beginning of the string.
$GLOBALS["BAN_PEERIDS"] = array(
    "A\x02\x06\x09-",
    "-ÄZ{Ü"
);

// Array of banned user agents, only exact matches
$GLOBALS["BAN_USERAGENTS"] = array(
    "Azureus 2.1.0.0",
    "Azureus 2.2.0.3_B1",
    "Azureus 2.2.0.3_B4",
    "Azureus 2.2.0.3_B29",

   " 0P3R4H BT, Opera/9.10 (Windows NT 5.1)",
"Ares 2.0.8.3029",
"Ares 2.0.9.3030",
"Azureus 2.2.0.2",
"Azureus 2.3.0.4",
"Azureus 2.3.0.6",
"Azureus 2.4.0.0",
"Azureus 2.4.0.2",
"Azureus 2.5.0.0",
"Azureus 2.5.0.2",
"Azureus 2.5.0.4",
"Azureus 3.0.1.2",
"Azureus 3.0.1.4",
"Azureus 3.0.1.6",
"Azureus 3.0.1.7",
"Azureus 3.0.2.0",
"Azureus 3.0.2.1",
"Azureus 3.0.2.2",
"AzureusBitTryant 2.5.0.0BitTryant",
"BitTorrent/4.0.2",
"BitTorrent/4.1.2",
"BitTorrent/4.1.4",
"BitTorrent/4.2.0",
"BitTorrent/4.24.0",
"BitTorrent/4.4.1",
"BitTorrent/5.0.3",
"BitTorrent/600B(3495)",
"BitTorrent/600B(3904)",
"BitTorrent/T-0.3.7",
"BitZip/BitZip-1.0.0",
"ktorrent/2.1",
"ktorrent/2.2.2",
"LimeWire/4.14.0",
"LimeWire/4.14.8",
"LimeWire/4.14.8 (Pro)",
"Mozilla/4.0 (compatible)",
"Mozilla/5.0 (Windows)",
"Opera BitTorrent, Opera/9.22 (Windows NT 5.1)",
"Opera BitTorrent, Opera/9.22 (X11)",
"Opera BitTorrent, Opera/9.23 (Windows NT 5.1)",
"Shareaza 2.2.1.0",
"Shareaza 2.2.5.0",
"Shareaza 2.2.5.5",
"Transmission/0.80 (2641)",
"Transmission/0.81 (2896)",
"uTorrent/1300",
"uTorrent/1400",
"uTorrent/1700",
"uTorrent/170B(1875)",
"uTorrent/170B(2539)",
"uTorrent/1710",
"uTorrent/1720",
);

?>