This commit is contained in:
Michael Yoo 2014-03-23 10:37:44 +10:30
commit 86f9d3e233

View File

@ -277,14 +277,14 @@ class PlayerAPI{
} }
break; break;
case "list": case "list":
$output .= "There are ".count($this->server->clients)."/".$this->server->maxClients." players online:\n"; $cmd_output .= "There are ".count($this->server->clients)."/".$this->server->maxClients." players online:\n";
if(count($this->server->clients) == 0){ if(count($this->server->clients) == 0){
break; break;
} }
foreach($this->server->clients as $c){ foreach($this->server->clients as $c){
$output .= $c->username.", "; $cmd_output .= $c->username.", ";
} }
$output = substr($output, 0, -2)."\n"; $output = substr($cmd_output, 0, -2)."\n";
break; break;
} }
return $output; return $output;