Witam, oto jedna z funkcji klasy valve_rcon.
public function authenticate() {
if (!$this->socket)
throw new Exception('Socket not opened');
if ($this->protocol == self::PROTO_CLASSIC) {
$this->challenge_rcon();
$this->classic_write('echo hi');
if (preg_match('/Bad rcon_password/', $this->classic_read())) '<td align="center" valign="middle" bgcolor="#4C4C4C" colspan="2">Generowanie serwera nie powiodło się.<br />Proszę? skontaktować? się? z administratorem: </td>' .
'</tr>';
} else {
$packet_id = $this->source_write(self::SERVERDATA_AUTH, $this->password);
$result = $this->source_read(null, 2);
if ($result[1]['id'] == -1)
throw new Exception('Authentication failure');
}
}
Po wpisaniu złego hasła pojawia się poprawnie
'<td align="center" valign="middle" bgcolor="#4C4C4C" colspan="2">Generowanie serwera nie powiodło się.<br />Proszę? skontaktować? się? z administratorem: </td>' .
'</tr>';
ale też pokazuje "Bad rcon_password.", ktoś może wie jak to naprawić?
Ten post edytował deLL 22.08.2012, 17:21:01