Ogen Dogen 2 814 Właściciel Last activity: 2 hours ago Posted September 27, 2015 Właściciel Share Posted September 27, 2015 Posted September 27, 2015 Na początku zaznaczam, że fix nie jest mojego autorstwa Otwieramy plik lgsl_protocol.php i zmieniamy kolejne fragmenty kodu w funkcji lgsl_query_05. 1. Znajdź: elseif ($lgsl_need['p']) { fwrite($lgsl_fp, "\xFF\xFF\xFF\xFFplayers\x00"); } elseif ($lgsl_need['e']) { fwrite($lgsl_fp, "\xFF\xFF\xFF\xFFrules\x00"); } } else { $challenge_code = isset($lgsl_need['challenge']) ? $lgsl_need['challenge'] : "\x00\x00\x00\x00"; if ($lgsl_need['s']) { fwrite($lgsl_fp, "\xFF\xFF\xFF\xFF\x54Source Engine Query\x00"); } elseif ($lgsl_need['p']) { fwrite($lgsl_fp, "\xFF\xFF\xFF\xFF\x55{$challenge_code}"); } elseif ($lgsl_need['e']) { fwrite($lgsl_fp, "\xFF\xFF\xFF\xFF\x56{$challenge_code}"); } Zamień na : elseif ($lgsl_need['e']) { fwrite($lgsl_fp, "\xFF\xFF\xFF\xFFrules\x00"); } elseif ($lgsl_need['p']) { fwrite($lgsl_fp, "\xFF\xFF\xFF\xFFplayers\x00"); } } else { $challenge_code = isset($lgsl_need['challenge']) ? $lgsl_need['challenge'] : "\x00\x00\x00\x00"; if ($lgsl_need['s']) { fwrite($lgsl_fp, "\xFF\xFF\xFF\xFF\x54Source Engine Query\x00"); } elseif ($lgsl_need['e']) { fwrite($lgsl_fp, "\xFF\xFF\xFF\xFF\x56{$challenge_code}"); } elseif ($lgsl_need['p']) { fwrite($lgsl_fp, "\xFF\xFF\xFF\xFF\x55{$challenge_code}"); } 2. Znajdź : $packet = fread($lgsl_fp, 4096); if (!$packet) { return FALSE; } Zamień na : if (!($packet = fread($lgsl_fp, 4096))) { if ($lgsl_need['s']) { return FALSE; } elseif ($lgsl_need['e']) { $lgsl_need['e'] = FALSE; return TRUE; } else { return TRUE; } } 3. Znajdź : elseif ($lgsl_need['p']) { if ($packet[4] == "m" || $packet[4] == "I") { continue; } } elseif ($lgsl_need['e']) { if ($packet[4] == "m" || $packet[4] == "I" || $packet[4] == "D") { continue; } } Zamień na : elseif ($lgsl_need['e']) { if ($packet[4] == "m" || $packet[4] == "I" || $packet[4] == "D") { continue; } } elseif ($lgsl_need['p']) { if ($packet[4] == "m" || $packet[4] == "I") { continue; } } 4. Znajdź: $server['p'][$player_key]['pid'] = ord(lgsl_cut_byte($buffer, 1)); Zamień na : lgsl_cut_byte($buffer, 1); 5. Znajdź : (niekonieczne - tylko optymalizacja) elseif ($lgsl_need['p']) { $lgsl_need['p'] = FALSE; } elseif ($lgsl_need['e']) { $lgsl_need['e'] = FALSE; } Zamień na : elseif ($lgsl_need['e']) { $lgsl_need['e'] = FALSE; } elseif ($lgsl_need['p']) { $lgsl_need['p'] = FALSE; } Zapisujemy i wysyłamy na serwer Link to comment Share on other sites More sharing options...
Recommended Posts