1. GSManager
    1. Funktionen
    2. Unterstützte Spiele
    3. Neuigkeiten
    4. Statistiken
    5. Serverliste
  2. Lexikon
  3. Filebase
  4. Entwicklung
  5. Forum
    1. Dashboard
    2. Unerledigte Themen
  6. Web-Interface
  7. Artikel
  8. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  • Deutsch
  • Anmelden
  • Registrieren
  • Suche
Dieses Thema
  1. GSManager
  2. Forum
  3. Erweiterungen
  4. Anfragen

Logging GSManager

  • Raiden
  • 11. Februar 2017 um 13:45
Das Projekt GSManager (vormals ManuAdminMod) wurde am 01.01.2020 eingestellt - diese Internetpräsenz bleibt verfügbar, die Software wird aber nicht länger gepflegt. Vielen Dank für eure Unterstützung in den mehr als zehn vergangenen Jahren!
  • Raiden
    Anfänger
    Reaktionen
    11
    Punkte
    296
    Trophäen
    1
    Dateien
    1
    Beiträge
    47
    • 11. Februar 2017 um 13:45
    • #1

    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)

  • Mirko911
    Entwickler
    Reaktionen
    165
    Punkte
    16.820
    Trophäen
    6
    Beiträge
    3.263
    Einträge
    11
    • 11. Februar 2017 um 22:48
    • #2

    https://gitlab.mirko-rosenthal.info/gsm-plugins/chatlog

    or the direct download:

    https://gitlab.mirko-rosenthal.info/gsm-plugins/ch….zip?ref=master

  • Raiden
    Anfänger
    Reaktionen
    11
    Punkte
    296
    Trophäen
    1
    Dateien
    1
    Beiträge
    47
    • 12. Februar 2017 um 11:01
    • #3

    Thank you very much, of course it is a pity that the ip log is not written, but it's better than nothing!

  • Dieses Thema enthält 3 weitere Beiträge, die nur für registrierte Benutzer sichtbar sind.

Benutzer online in diesem Thema

  • 1 Besucher
  1. Mitarbeiter
  2. Datenschutzerklärung
  3. Nutzungsbedingungen
  4. Impressum
  5. Kontakt
Community-Software: WoltLab Suite™
  • Alles
  • Dieses Thema
  • Dieses Forum
  • Artikel
  • Seiten
  • Dateien
  • Forum
  • Lexikon
  • Erweiterte Suche
  • Deutsch
  • English
Zitat speichern