/** * Passively invite a character to a clan with a message and link. * * @return string */ public function invite(Player $p_target, Player $p_inviter) { if (!$p_target || empty($p_target)) { return 'No such ninja.'; } $active = $p_target->isActive(); if (!$active) { $failureError = 'That ninja is not active.'; } else { $inviteMsg = $p_inviter->name() . ' has invited you into their clan, ' . $this->getName() . '. ' . 'To accept, choose their clan ' . $this->getName() . ' on the ' . '[href:/clan/view?clan_id=' . $this->id . '|clan joining page].'; Message::create(['send_from' => $p_inviter->id(), 'send_to' => $p_target->id(), 'message' => $inviteMsg, 'type' => 0]); $failureError = null; } return $failureError; }