src/T4G/BFP4F/Rcon/Chat.php
public function fetch($limit=null)
    {
        $data = Base::query('bf2cc serverchatbuffer');
        
        $spl = explode("\r\r", $data);
        
        $result = array();
        
        $i = 0;
        
        foreach ($spl as $chat) {
            $ex = explode("\t", $chat);
            
            if(count($ex) < 2) continue;
            
            list($index, $origin, $team, $type, $time, $message) = $ex;
            
            if (!$limit or $limit > count($spl)-$i) {
                $result[] = (object) array
                (
                    'origin'    =>  $origin,
                    'type'      =>  $type,
                    'team'      =>  $team,
                    'time'      =>  substr($time, 1, -1),
                    'message'   =>  $message,
                    'index'     =>  $index
                );
            }            
            ++$i;
        }
        return $result;
    }
public function fetch($limit=null)
    {
        $data = Base::query('bf2cc serverchatbuffer');
        
        $spl = explode("\r\r", $data);
        
        $result = array();
        
        $i = 0;
        
        foreach ($spl as $chat) {
            $ex = explode("\t", $chat);
            
            if(count($ex) < 2) continue;
            
            list($index, $origin, $team, $type, $time, $message) = $ex;
            
            if (!$limit or $limit > count($spl)-$i) {
                $result[] = (object) array
                (
                    'origin'    =>  $origin,
                    'type'      =>  $type,
                    'team'      =>  $team,
                    'time'      =>  substr($time, 1, -1),
                    'message'   =>  $message,
                    'index'     =>  $index
                );
            }            
            ++$i;
        }
        return $result;
    }
public function fetch ( $ limit = null ) { $ data = Base :: query ( 'bf2cc serverchatbuffer' ) ; $ spl = explode ( "\r\r" , $ data ) ; $ result = array ( ) ; $ i = 0 ; foreach ( $ spl as $ chat ) { $ ex = explode ( "\t" , $ chat ) ; if ( count ( $ ex ) < 2 ) continue ; list ( $ index , $ origin , $ team , $ type , $ time , $ message ) = $ ex ; if ( ! $ limit or $ limit > count ( $ spl ) - $ i ) { $ result [ ] = ( object ) array ( 'origin' => $ origin , 'type' => $ type , 'team' => $ team , 'time' => substr ( $ time , 1 , - 1 ) , 'message' => $ message , 'index' => $ index ) ; } ++ $ i ; } return $ result ; }
Fetches current Chat-Buffer

@param int $limit = null

@return array
Fetches current Chat - Buffer