public function rconAuth($password) {
        $this->rconPassword = $password;

        try {
            $this->rconAuthenticated = true;
            $this->rconExec('');
        } catch (RCONNoAuthException $e) {
            $this->rconAuthenticated = false;
            $this->rconPassword = null;
        }

        return $this->rconAuthenticated;
    }
public function rconAuth($password) {
        $this->rconPassword = $password;

        try {
            $this->rconAuthenticated = true;
            $this->rconExec('');
        } catch (RCONNoAuthException $e) {
            $this->rconAuthenticated = false;
            $this->rconPassword = null;
        }

        return $this->rconAuthenticated;
    }
public function rconAuth ( $ password ) { $ this -> rconPassword = $ password ; try { $ this -> rconAuthenticated = true ; $ this -> rconExec ( '' ) ; } catch ( RCONNoAuthException $ e ) { $ this -> rconAuthenticated = false ; $ this -> rconPassword = null ; } return $ this -> rconAuthenticated ; }
Tries to establish RCON authentication with the server with the given
password

This will send an empty command that will ensure the given password was
correct. If successful, the password is stored for future use.

@param string $password The RCON password of the server
@return bool <var>true</var> if authentication was successful
@see #rconExec
@throws TimeoutException if the request times out
Tries to establish RCON authentication with the server with the given password