private function execWarnOn(CommandSender $issuer, Session $ses)
 {
     $msg = $ses->translate(Phrases::WARNING_RECEIVED_NOTIFICATION, ["issuer" => $issuer->getName(), "message" => $this->msg, "points" => $this->points, "totalpoints" => $ses->getWarningPoints()]);
     $conseq = Settings::getWarnPtsConseq($ses->getWarningPoints());
     if ($conseq->banLength) {
         $msg .= $ses->translate(Phrases::WARNING_BANNED_NOTIFICATION, ["length" => MUtils::time_secsToString($conseq->banLength)]);
         $msg = "\n" . $msg;
         $ses->getPlayer()->kick($msg, false);
     } elseif ($conseq->muteSecs) {
         $msg .= $ses->translate(Phrases::WARNING_MUTED_NOTIFICATION, ["length" => MUtils::time_secsToString($conseq->muteSecs)]);
         $ses->getPlayer()->sendMessage($msg);
         // TODO mute
     }
 }
 /**
  * @param Session $session
  * @param int $status
  * @return mixed[][]|mixed[]
  */
 protected function getColumns(Session $session, $status)
 {
     $coins = $session->getCoins();
     $this->coinsDelta = $session->getAndUpdateCoinsDelta();
     $skin = $session->getCurrentFaceSkin();
     return ["uid" => ["v" => $session->getUid(), "noupdate" => true], "name" => ["v" => strtolower($session->getPlayer()->getName())], "nicks" => "|" . implode("|", $session->getNicks()) . "|", "lastip" => $session->getPlayer()->getAddress(), "status" => $status, "lastses" => Settings::$LOCALIZE_CLASS, "authuuid" => $session->getPlayer()->getUniqueId(), "coins" => ["v" => $coins, "noupdate" => true], "hash" => ["v" => $session->getPasswordHash(), "noupdate" => true], "pwprefix" => ["v" => $session->getPasswordPrefix(), "noupdate" => true], "pwlen" => ["v" => $session->getPasswordLength(), "noupdate" => true], "registration" => ["v" => $session->getRegisterTime(), "noupdate" => true], "laston" => time(), "ontime" => (int) $session->getAndUpdateOntime(), "config" => $session->getAllSettings(), "skin1" => ["v" => substr($skin, 0, 128), "bin" => true], "skin2" => ["v" => substr($skin, 128, 128), "bin" => true], "lastgrind" => $session->getLastGrind(), "rank" => ["v" => $session->getRank(), "noupdate" => true], "warnpts" => $session->getWarningPoints(), "lastwarn" => $session->getLastWarnTime(), "tid" => $session->getTeamId(), "teamrank" => $session->getTeamRank(), "teamjoin" => $session->getTeamJoinTime(), "ignorelist" => "," . implode(",", $session->getIgnoreList()) . ","];
 }
 public function execWarnOn(CommandSender $issuer, Session $ses)
 {
     $msg = $ses->translate(Phrases::WARNING_RECEIVED_NOTIFICATION, ["issuer" => $issuer->getName(), "message" => $this->msg, "points" => $this->points, "totalpoints" => $ses->getWarningPoints()]);
     $consequence = Settings::getWarnPtsConsequence($ses->getWarningPoints(), $this->creation);
     if ($consequence->banLength) {
         $msg .= $ses->translate(Phrases::WARNING_BANNED_NOTIFICATION, ["length" => MUtils::time_secsToString($consequence->banLength)]);
         $msg = "\n" . $msg;
         $ses->getPlayer()->kick($msg, false);
     } elseif ($consequence->muteSecs) {
         $mute = new MuteIssue();
         $mute->cid = $this->clientId;
         $mute->ip = $ses->getPlayer()->getAddress();
         $mute->uid = $this->uid;
         $mute->length = $consequence->muteSecs;
         $mute->msg = $this->msg;
         $mute->since = $this->creation;
         $mute->src = $issuer->getName();
         $ses->getPlayer()->sendMessage($msg);
         MuteHormone::fromObject($ses->getMain(), $mute)->release();
     }
 }