public function __construct($host_id, $remote_address, $remote_port = 6112, $gameport = 6112, $username, $creator, $gamename, $map_index, $gametype)
 {
     $this->game_type = $gametype;
     $this->map_index = $map_index;
     $this->game_name = $gamename;
     $this->host = new gameHost($this, $gameport, $username, $host_id, $creator, $gamename, $gametype);
     parent::__construct($remote_address, $remote_port, $gameport, $username);
     if ($this->host->failed) {
         parent::sendText("/w {$creator} Failed to create the game. Perhpas the game port is occupied. Please try again later.");
         exit;
     }
 }
示例#2
0
 public function __construct($remote_address, $remote_port = 6112, $gameport = 6112, $username)
 {
     parent::__construct($remote_address, $remote_port, $gameport, $username);
     global $dbserver, $dbusername, $dbpassword, $dbname;
     $this->db = new sql_db($dbserver, $dbusername, $dbpassword, $dbname, false);
     if (!$this->db->db_connect_id) {
         die("failed to connect to database\n");
     }
     $this->userlist = new index(WORKING_PATH . 'data/vouched.txt');
     $this->adminlist = new index(WORKING_PATH . 'data/commanders.txt');
     $this->marshall_list = new index(WORKING_PATH . 'data/marshalls.txt');
     var_dump($this->marshall_list);
     $this->clear_flood_timer = new timer('clearflood', 3600000);
     $this->free_host_timer = new timer('free', 1000);
 }