I bumped into this problem too when trying to use the client's username somewhere. I'm not sure how to make it work properly either
php -v
<?php
protected function &getClientByUCID(&$UCID, $hostID = null)
{
if (($clients =& $this->getHostState($hostID)->clients) && $clients !== null && isset($clients[$UCID])) {
return $clients[$UCID];
}
$return = null;
return $return;
}
?>
<?php
protected function &getClientByPLID(&$PLID, $hostID = null)
{
if (($players = $this->getHostState($hostID)->players) && $players !== null && isset($players[$PLID])) {
$UCID = $players[$PLID]->UCID; # As so to avoid Indirect modification of overloaded property NOTICE;
return $this->getClientByUCID($UCID);
}
return $return; // bug
}
?>