diff --git a/src/php/download.php b/src/php/download.php index 8f62933..c3f61af 100644 --- a/src/php/download.php +++ b/src/php/download.php @@ -58,13 +58,11 @@ $dlCounter = $redis->get($hashKey); if($dlCounter != FALSE) { if($dlCounter >= _DL_CAPTCHA * 2){ - /*$cfbk = 'VC:CF:BLOCK'; + $cfbk = 'VC:CF:BLOCK'; if(_CLOUDFLARE_API_KEY != 'API_KEY' && $redis->sIsMember($cfbk, _UIP) == False){ $redis->sadd($cfbk, _UIP); - include_once('cloudflare.php'); AddFirewallRule(_UIP); - }*/ - header('location: /'); + } exit(); }else if($dlCounter >= _DL_CAPTCHA){ //redirect for captcha check diff --git a/src/php/functions.php b/src/php/functions.php index aadb0b4..8908d03 100644 --- a/src/php/functions.php +++ b/src/php/functions.php @@ -216,7 +216,7 @@ } function ga_event($cat, $act) { - GACollect(array( + ga_collect(array( "t" => "event", "ec" => $cat, "ea" => $act @@ -331,7 +331,7 @@ 'target' => 'ip', 'value' => $ip ), - 'notes' => 'void.cat auto block' + 'notes' => 'blocked by: ' . $_SERVER['SERVER_NAME'] ); $ch = curl_init(); @@ -350,11 +350,9 @@ $cfr = json_decode($result, true); if($cfr['success'] == True){ - $discord_data = array("content" => "[IP BLOCKED] " . $ip); - include_once("discord.php"); + send_discord_msg(array("content" => "[IP BLOCKED] " . $ip)); }else { - $discord_data = array("content" => "[IP BLOCK ERROR] " . $ip . "\n```json\n" . $result . "\n```"); - include_once("discord.php"); + send_discord_msg(array("content" => "[IP BLOCK ERROR] " . $ip . "\n```json\n" . $result . "\n```")); } return $cfr;