. * * $Id: teeworlds.php,v 1.2 2009/03/09 13:36:32 tombuskens Exp $ */ [teeworlds] status = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFFgief" require_once GAMEQ_BASE . 'Protocol.php'; /** * Teeworlds protocol * * @author Tom Buskens * @version $Revision: 1.2 $ */ class GameQ_Protocol_teeworlds extends GameQ_Protocol { /* * status packet */ public function status() { $this->p->skip(14); $this->r->add('version', $this->p->readString()); $this->r->add('hostname', $this->p->readString()); $this->r->add('map', $this->p->readString()); $this->r->add('gametype', $this->p->readString()); $this->r->add('password', $this->p->readString()); $this->r->add('ping', $this->p->readString()); $this->r->add('num_players', $this->p->readString()); $this->r->add('max_players', $this->p->readString()); $this->players(); } private function players() { while ($name = $this->p->readString()) { $this->r->addPlayer('name', $name); $this->r->addPlayer('score', $this->p->readString()); } } } ?>