public function process() { $o = new Object(); $o->setUserId($this->datas['user_id']); $o->setUserName($this->datas['user_name']); $o->setUserTeam($this->datas['user_team']); $o->setUserSteamid($this->datas['steam_id']); $o->setObject(strtolower($this->datas['object'])); return $o; }
private function processPurchased(\eBot\Message\Type\Purchased $message) { Logger::debug("Processing Purchased Message"); if (!$this->waitForRestart && $this->enable && in_array($this->getStatus(), array(self::STATUS_FIRST_SIDE, self::STATUS_SECOND_SIDE, self::STATUS_OT_FIRST_SIDE, self::STATUS_OT_SECOND_SIDE))) { $user = $this->processPlayer($message->getUserId(), $message->getUserName(), $message->getUserTeam(), $message->getUserSteamid()); $text = \addslashes(\serialize(array("item" => $message->object, "player" => $user->getId(), "playerName" => $user->get("name")))); \mysql_query("\n INSERT INTO `round`\n (`match_id`,`map_id`,`event_name`,`event_text`,`event_time`,`round_id`,`created_at`,`updated_at`)\n VALUES\n ('" . $this->match_id . "', '" . $this->currentMap->getMapId() . "', 'purchased', '{$text}', '" . $this->getRoundTime() . "', '" . $this->getNbRound() . "', NOW(), NOW())\n "); // $this->addLog($message->userName . " (" . $message->userTeam . ") purchased " . $message->object); } }