. * * $Id: redfaction.php,v 1.1 2007/06/30 12:43:43 tombuskens Exp $ */ [redfaction] status = "\x00\x00\x00\x00" require_once GAMEQ_BASE . 'Protocol.php'; /** * Red Faction Protocol * * @author Tom Buskens * @version $Revision: 1.1 $ */ class GameQ_Protocol_redfaction extends GameQ_Protocol { /* * getstatus packet */ public function status() { // Header, we're being carefull here if ($this->p->read() !== "\x00") { throw new GameQ_ParsingException($this->p); } // Dunno while ($this->p->read() !== "\x00") {} $this->p->read(); // Data $this->r->add('servername', $this->p->readString()); $this->r->add('gametype', $this->p->readInt8()); $this->r->add('num_players', $this->p->readInt8()); $this->r->add('max_players', $this->p->readInt8()); $this->r->add('map', $this->p->readString()); $this->p->read(); $this->r->add('dedicated', $this->p->readInt8()); } }