public function whitelist() {
		if ($this->params['remove']) {
			$this->Maintenance->clearWhitelist();
		}

		$ips = $this->args;
		if (!empty($ips)) {
			foreach ($ips as $ip) {
				if (!Validation::ip($ip)) {
					$this->abort($ip . ' is not a valid IP address.');
				}
			}
			if ($this->params['remove']) {
				$this->Maintenance->clearWhitelist($ips);
			} else {
				$this->Maintenance->whitelist($ips, $this->params['debug']);
			}
			$this->out('Done!', 2);
		}

		$this->out('Current whitelist:');
		$ips = $this->Maintenance->whitelist();
		if (!$ips) {
			$this->out('n/a');
		} else {
			$this->out($ips);
		}
	}