. * * $Id: cs2d.php,v 1.1 2008/04/14 18:04:50 tombuskens Exp $ */ [cs2d] status = "\xfa\x00" require_once GAMEQ_BASE . 'Protocol.php'; /** * Counterstrike 2d Protocol * * @author Tom Buskens * @version $Revision: 1.1 $ */ class GameQ_Protocol_cs2d extends GameQ_Protocol { public function status() { $this->p->skip(2); $this->r->add('hostname', $this->readString()); $this->r->add('password', $this->p->readInt8()); $this->r->add('mapname', $this->readString()); $this->r->add('num_players', $this->p->readInt8()); $this->r->add('max_players', $this->p->readInt8()); $this->r->add('fog_of_war', $this->p->readInt8()); $this->r->add('war_mode', $this->p->readInt8()); $this->r->add('version', $this->readString()); } private function readString() { $str = $this->p->readString("\x0D"); $this->p->skip(1); return $str; } } ?>