~registry/flses/trunk

« back to all changes in this revision

Viewing changes to classes/getplayers.php

  • Committer: Fabian Thoma
  • Date: 2009-06-06 14:43:01 UTC
  • Revision ID: fabian.thoma@yahoo.de-20090606144301-9tc29bom162eqdzw
+GNU GPL v3 Message
+development in Bank feature
+setrep function in FLHook class

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
function getplayers()
2
 
{#getplayers
3
 
        $this->conn->write("getplayers\r\n"); 
4
 
        $playerinfos = $this->conn->read_till('OK');
5
 
        $arrPlayerinfo = explode("<br>",$playerinfos);
6
 
        $result = array();
7
 
        foreach($arrPlayerinfo as $playerinfo)
8
 
        {
9
 
                if(substr($playerinfo,0,8) == "charname")
10
 
                {
11
 
                        $playerinfo = str_replace(" ","&",$playerinfo);
12
 
                        parse_str($playerinfo);
13
 
                        echo $playerinfo;
14
 
                        array_push($result, array("name" => $charname, "ip" => $ip, "host" => $host, "system" => $system, "base" => $base, "hookid" => $clientid, "ping" => $ping, "loss" => $loss));
15
 
                }
16
 
        }
17
 
        return $result;
18
 
}