diff --git a/src/Service/CacheService.php b/src/Service/CacheService.php index ce4d07c..704cd67 100644 --- a/src/Service/CacheService.php +++ b/src/Service/CacheService.php @@ -47,14 +47,14 @@ public function antiSpiderUse(User $user, int $target) { public function canSend(string $ip, string $target) { $current = (int)$this->client->get($this->getIdentifierForCode($ip)); - if($current > 5) + if($current >= 5) return false; $current ++; $this->client->set($this->getIdentifierForCode($ip), $current); $this->client->expire($this->getIdentifierForCode($ip), 1800); $current = (int)$this->client->get($this->getIdentifierForCode($target)); - if($current > 1) + if($current >= 1) return false; $current ++; $this->client->set($this->getIdentifierForCode($target), $current);