Beispiel #1
0
 /**
  * Overload for client port
  *
  * @param string $ip
  * @param integer $port
  * @param array $options
  */
 public function __construct($ip = FALSE, $port = FALSE, $options = array())
 {
     // Got to do this first
     parent::__construct($ip, $port, $options);
     // Correct the client port since query_port = client_port + 1
     $this->port_client($this->port_client() - 1);
 }
Beispiel #2
0
 /**
  * We have to overload this function to cheat the rules processing because of some wierdness, old ass game!
  *
  * @see GameQ_Protocols_Source::preProcess_rules()
  */
 protected function preProcess_rules($packets)
 {
     $engine_orig = $this->source_engine;
     // Override the engine type for rules, not sure why its like that
     $this->source_engine = self::GOLDSOURCE_ENGINE;
     // Now process the rules
     $ret = parent::preProcess_rules($packets);
     // Reset the engine type
     $this->source_engine = $engine_orig;
     return $ret;
 }
Beispiel #3
0
 protected function process_details()
 {
     // Process the server details first
     $results = parent::process_details();
     // Now we need to fix the "map" for their hack
     if (isset($results['map']) && preg_match('/(?P<cur>\\d{1,})\\/(?P<max>\\d{1,})/i', trim($results['map']), $m)) {
         // Define the player counts
         $results['num_players'] = $m['cur'];
         $results['max_players'] = $m['max'];
         unset($m);
     }
     // Map never changes it seems...
     $results['map'] = 'Panau';
     return $results;
 }
Beispiel #4
0
 protected function process_details()
 {
     $result = parent::process_details();
     $result['steamappid'] = 270150;
     return $result;
 }
Beispiel #5
0
 /**
  * Overload for client port
  *
  * @param string $ip
  * @param integer $port
  * @param array $options
  */
 public function __construct($ip = FALSE, $port = FALSE, $options = array())
 {
     // Got to do this first
     parent::__construct($ip, $port, $options);
 }
Beispiel #6
0
 protected function process_status()
 {
     $result = parent::process_status();
     $result['steamappid'] = 346110;
     return $result;
 }