How to make logging GSManager as the MAM logs the players have connected to the server and chat log, it was very comfortable?
The log file folder in my empty files and players.log reports.log, filled only daemon.log. Also in the plugins folder there players.log file in which the imaged requests for information about the player, it is something that is necessary but would like to have that is not in the request and if the player is connected to the server ...
Plugins for old MAM
PHP: chatlog.php
<?php
$mod->registerEvent("playerSay", "chatlog_write");
$chatlog_fp = fopen($logdir . "/chat.log", "a");
function chatlog_write($param) {
list($guid, $text) = $param;
global $players;
global $chatlog_fp;
global $mod;
$timestamp = date("[d.m.y H:i:s]");
$name = $players[$guid]->getName();
$text = $mod->removecolor($text);
fwrite($chatlog_fp, "$timestamp $name: $text\r\n");
}
?>
Alles anzeigen
PHP: ipwrite.php
<?php
//ЗАПИСЬ IP ПОДКЛЮЧЁННЫХ ИГРОКОВ В ЛОГ
//BATTLEFRAME.RU......By Xsfd_M.D.A
$mod->registerEvent("playerJoined", "connect_geo");
function connect_geo($guid) {
global $mod;
global $players;
$date = date("[d.m.y H:i:s]");
$player =& $players[$guid];
$guidplayer = $players[$guid]->getGuid();
$pidplayer = $players[$guid]->getPid();
$nameplayer = $players[$guid]->getName();
$status = $mod->rconPlayerList();
foreach ($status as $line) {
if ($line["pid"] == $players[$guidplayer]->getPid() || $line["guid"] == $guidplayer) {
$ip = $line["ip"];
$h = fopen(LOGDIR . "/players_ip.log", "a");
fwrite($h, "$date $nameplayer ($ip) - [$guidplayer]\n");
fclose($h);
break;
}
}
}
?>
Alles anzeigen
P.S Do not swear much, if you just need to turn on any parameter that tell me please)