game = $game; $this->db = $game->getDBAccess(); $this->players = $game->getLib('beta5/player'); } public function getSender() { return 'Peacekeeper Headquarters'; } public function getSLink() { return ''; } public function getRecipient() { $name = $this->players->call('getName', $this->player); return utf8entities($name); } public function getRLink() { return ''; } public function getSubject() { switch ($this->data['msg_type']) { case 'W': return 'Your fleets have entered protected territory'; case 'D': return 'Your fleets will be destroyed'; case 'E': return 'You have been declared an ennemy of the Peacekeepers'; } return 'Huh? wrong message type'; } public function getReplyLink() { return ''; } public function getContents() { $planets = "
Best regards,
Peacekeeper Commander Dapkor
break;
case 'D':
?>
Your hostile actions will not go unpunished! The Peacekeepers will see to it that your fleets are destroyed on the
following planets:
Regards,
Peacekeeper Commander Multair
break;
case 'E':
?>
Your continued hostile behaviour has forced us to declare you an enemy of the Peacekeepers. Your fleets will be destroyed
on sight whenever you enter protected territory, and we will not protect you if you need it.
In addition, your fleets will be destroyed on the following planets:
Sanctions against you will end at =gmstrftime("%H:%M on %d/%m/%Y", $this->data['delay'])?>.
Peacekeeper Commander Hestaks
break;
}
$str = ob_get_contents();
ob_end_clean();
return $str;
}
private function getPlanets() {
$q = $this->db->query("SELECT planet, p_name FROM pkwarning_planet WHERE id = {$this->data['id']}");
$planets = array();
while ($r = dbFetchArray($q)) {
array_push($planets, "" . utf8entities($r[1]) . "");
}
return $planets;
}
}
?>