Added more configuration options, based on patch by Uli Köhler

This commit is contained in:
Simon Rupf
2013-10-30 23:54:42 +01:00
parent b19e4d4689
commit 630e16c4a0
5 changed files with 80 additions and 38 deletions

View File

@@ -69,6 +69,9 @@ class trafficlimiter
*/
public static function canPass($ip)
{
// disable limits if set to less then 1
if (self::$_limit < 1) return true;
// Create storage directory if it does not exist.
if (!is_dir(self::$_path)) mkdir(self::$_path, 0705);
// Create .htaccess file if it does not exist.