diff --git a/finger/FingerClient.php b/finger/FingerClient.php --- a/finger/FingerClient.php +++ b/finger/FingerClient.php @@ -41,7 +41,7 @@ public $lastError; /** - * Blacklist of blocked hosts, where you can't finger + * Blocked hosts, where you can't finger * @var array */ private $blockedHosts = []; @@ -79,7 +79,7 @@ */ public function Run () { if (in_array($this->server, $this->blockedHosts)) { - $this->lastError = "This server $this->server has been blacklisted (probably because of frequent timeouts)."; + $this->lastError = "This server $this->server has been blocked (probably because of frequent timeouts)."; return false; } @@ -215,18 +215,18 @@ } /** - * Adds the specified hosts into the blacklist + * Adds the specified hosts into the blocklist * * @param array the list of hosts to add to the blacklist */ - public function AddToBlacklist ($blockedHosts) { + public function AddToBlocklist ($blockedHosts) { $this->blockedHosts = array_merge($this->blockedHosts, $blockedHosts); } /** - * Clears the blacklist + * Clears the blocklist */ - public function ClearBlacklist () { + public function ClearBlocklist () { $this->blockedHosts = []; } } diff --git a/finger/blacklist.txt b/finger/blocklist.txt rename from finger/blacklist.txt rename to finger/blocklist.txt diff --git a/finger/thimbl.php b/finger/thimbl.php --- a/finger/thimbl.php +++ b/finger/thimbl.php @@ -13,7 +13,7 @@ * * @const */ - const BLACKLIST_FILE = 'finger/blacklist.txt'; + const BLOCKLIST_FILE = 'finger/blocklist.txt'; /// /// Private properties @@ -71,7 +71,7 @@ return; } - $this->handleBlackList(); + $this->handleBlockList(); if (!$this->client->Run()) { $this->errors[] = $this->client->lastError; @@ -104,17 +104,17 @@ } /** - * Handles blacklist + * Handles blocklist */ - private function handleBlackList () { - if (file_exists(self::BLACKLIST_FILE)) { - $blackListedServers = explode( + private function handleBlockList () { + if (file_exists(self::BLOCKLIST_FILE)) { + $blockListedServers = explode( "\n", trim( - file_get_contents(self::BLACKLIST_FILE) + file_get_contents(self::BLOCKLIST_FILE) ) ); - $this->client->AddToBlacklist($blackListedServers); + $this->client->AddToBlocklist($blockListedServers); } }