. * * $Id: cube.php,v 1.1 2007/07/04 09:08:36 tombuskens Exp $ */ [cube] status = "\x00" require_once GAMEQ_BASE . 'Protocol.php'; /** * Cube Engine protocol * * @author Tom Buskens * @version $Revision: 1.1 $ */ class GameQ_Protocol_cube extends GameQ_Protocol { /* * status packet */ public function status() { // Header if (!$this->p->read() == "\x00") { throw new GameQ_ParsingException($this->p); } $this->p->skip(2); // Vars $this->r->add('protocol', $this->p->readInt8()); $this->r->add('mode', $this->p->readInt8()); $this->r->add('num_players', $this->p->readInt8()); $this->r->add('time_remaining', $this->p->readInt8()); $this->r->add('map', $this->p->readString()); $this->r->add('servername', $this->p->readString()); $this->r->add('max_players', $this->p->readInt8()); } } ?>