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
  • Anmelden
  • Registrieren
  • Suche
Dieses Thema
  • Alles
  • Dieses Thema
  • Dieses Forum
  • Artikel
  • Seiten
  • Dateien
  • Forum
  • Lexikon
  • Erweiterte Suche
  1. GSManager
  2. Forum
  3. Allgemeines
  4. Fehler

Issues with 1.3 patch

  • w4jchosen
  • 5. März 2009 um 04:11
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!
1. offizieller Beitrag
  • w4jchosen
    Anfänger
    Punkte
    80
    Beiträge
    13
    • 5. März 2009 um 04:11
    • #1

    The new 1.3 patch is causing manuadmin not to run properly. It starts up and looks fine, but then dies. I see a post in your German forums concerning it, but I don't know German so any assistance would be appreciated. Thanks.

    ***edit***

    Banner messages are working, but in game commands (the most important part) are not.

  • Dennis
    Administrator
    Reaktionen
    148
    Punkte
    37.933
    Trophäen
    7
    Artikel
    4
    Dateien
    2
    Beiträge
    7.453
    • 5. März 2009 um 05:37
    • Offizieller Beitrag
    • #2

    With Patch 1.3 there came a new Logging-System which allows the MAM to log some new Information.
    But it also seems, that the new logging System destroyed the things we did up to now, so i think you have to wait for an Update of MAM.
    Maybe in Version 1.0. I would be soooo happy, to see that.

    • Nächster offizieller Beitrag
  • Bunni
    Anfänger
    Punkte
    10
    Beiträge
    2
    • 5. März 2009 um 06:29
    • #3

    fix for the parser:

    PHP
    <?php
    
    
    
    
    class parser {
    	private $logfile = false;
    	private $parsedloglines = 0;
    	private $logpos = 0;
    	private $lastparsed = "0000000000";
    
    
    
    
    	public function __construct($logfile, &$success) {
    		if (!is_readable($logfile)) {
    			$success = false;
    			return;
    		}
    		$this->logfile = $logfile;
    		$this->logpos = filesize($this->logfile);
    
    
    
    
    		$succes = true;
    	}
    
    
    
    
    	public function getNewLines() {
    		$fp = fopen($this->logfile, "r");
    		fseek($fp, $this->logpos, SEEK_SET);
    
    
    
    
    		$newlines = array();
    
    
    
    
    		while (!feof($fp)) {
    			$get = fgets($fp);
    			if ($get === false) {
    				break;
    			}
    			$this->logpos += strlen($get);
    			$newlines[] = $get;
    		}
    
    
    
    
    		fclose($fp);
    
    
    
    
    		return $newlines;
    
    
    
    
    	}
    
    
    
    
    	public function parseLine($line) {
    		$pattern = '|^\s*(\d{10}) |';
    		if (preg_match($pattern, $line, $subpatterns) == 0) {
    			return false;
    		}
    
    
    
    
        	$lasttime = (int) $this->lastparsed;
        	$thistime = (int) $subpatterns[1];
    
        	if ($lasttime > $thistime) {
            	$restart = true;
        	}
        	else {
            	$restart = false;
        	}
    
    
    
    
    		$this->lastparsed = $subpatterns[1];
    		$this->parsedloglines ++;
    
    
    
    
    		$line = trim(str_replace($subpatterns[0], "", $line));
    		$action = $this->getAction($line);
    
    
    
    
    		return array(
    			"timestamp" => $this->lastparsed,
    			"line" => $line,
    			"action" => $action,
    			"parsed" => $this->parseParts($line, $action),
    			"serverrestart" => $restart,
    		);
    	}
    
    
    
    
    	private function getAction($line) {
    		$actions = array(
    			"damage" => "D;",
    			"vehicledamage" => "VD;",
    			"actordamage" => "AD;",
    			"kill" => "K;",
    			"join" => "J;",
    			"quit" => "Q;",
    			"say" => "say;",
    			"sayteam" => "sayteam;",
    			"weapon" => "Weapon;",
    			"nextmap" => "InitGame:",
    			"exitmap" => "ShutdownGame:",
    			"mapend" => "ExitLevel: executed"
    		);
    		foreach ($actions as $key => $value) {
    			if (strpos($line, $value) === 0) {
    				return $key;
    			}
    		}
    		return "unknown";
    	}
    
    
    
    
    	private function parseParts($line, $action) {
    		switch ($action) {
    			case "damage":
    			case "weapon":
    			case "kill":
    			case "join":
    			case "quit":
    			case "vehicledamage":
    			case "actordamage":
    				$parts = explode(";", $line);
    				array_shift($parts);
    				return $parts;
    
    
    
    
    			case "say":
    			case "sayteam";
    				$parts = explode(";", $line, 5);
    				array_shift($parts);
    				if ($parts[3]{0} == chr(21)) {
    					$parts[3] = substr($parts[3], 1);
    				}
    				return $parts;
    
    
    
    
    			case "mapend":
    			case "exitmap":
    				return false;
    
    
    
    
    			case "nextmap":
    				$explode = explode("\\", $line);
    				$parts = array();
    				for($i = 1; $i < count($explode); $i += 2) {
    					$parts[$explode[$i]] = $explode[$i + 1];
    				}
    				return $parts;
    
    
    
    
    			default:
    				return false;
    		}
    	}
    
    
    
    
    	public function getLastParsedTimeStamp() {
    		return $this->lastparsed;
    	}
    }
    Alles anzeigen

    testing to make sure this works on windows...

  • Dieses Thema enthält 8 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™