Posts: 46 Joined: Sat Sep 08 2012, 05:20PM Registered Member #7384
ENG: This modification allows you to write RCON password to the database directly from the LGSL admin page and use it in the future. RUS: Эта модификация позволяет записывать RCON-пароль в базу данных LGSL прямо из админки, и использовать его в дальнейшем.
STEP 1. 1. Backup file lgsl_admin.php 2. Open file lgsl_admin.php in Notepad++
STEP 3. 1. Go to your phpmyadmin page and login as priveleged user. 2. Go to database which contains lgsl table.
3. Add column to this table with query:
ALTER TABLE `lgsl` ADD `rcon_pwd` varchar( 32 ) NOT NULL default '' AFTER `s_port`;
# ---------------------------------------------------------------------------------------------------------------------------- Now, if we need the rcon password to query the server, we can simply insert it in ones field in admin page and press "Save- reset cache" button. And we must start Query for games with rcon password(in the lgsl_protocol.php) like this:
global $rcon_pwd;
if (empty($rcon_pwd)) { return TRUE; }
fwrite($lgsl_fp, "\xFF\xFF\xFF\xFFrcon {$rcon_pwd} status\x00"); // for example only!
Posts: 46 Joined: Sat Sep 08 2012, 05:20PM Registered Member #7384
ENG: We shall try to apply RCON query (see first post). For example, to display the GUID and IP ModernWarfare2 players (fourdeltaone edition), we have to use RCON-password. Here is the solution:
RUS: Попробуем применить RCON (см. первый пост) на практике. Например, чтобы вывести GUID и IP игроков из ModernWarfare2 (от fourdeltaone) нам нужно использовать RCON-пароль. Вот работающее решение:
$part = explode("\n", $buffer); // SPLIT INTO PARTS: HEADER/SETTINGS/PLAYERS/FOOTER
array_pop($part); // REMOVE FOOTER WHICH IS EITHER NULL OR "\challenge\"
$item = explode("\\", $part[1]); // SPLIT PART INTO ITEMS
foreach ($item as $item_key => $data_key)
{
if (!($item_key % 2))
{
continue;
} // SKIP EVEN KEYS
ENG: p.s.This modification for MW2 has appeared thanks to the enthusiasm of the Xsfd (M.D.A), I just modified the code to fully operational status. RUS: p.s. Мод для MW2 появился благодаря энтузиазму Xsfd (M.D.A), я же просто "допилил" код до полностью рабочего состояния. http://bigshooter.ru