Add ProjectZomboidCmdLog (cmd.txt)
Per-line client RPC trace. Parser captures only the timestamp; analysers decompose steamid/player/command/coords via CmdPattern::FIELDS. Detectors: filename match plus content signature on the 'steamid "name" command @ x,y,z' line shape.
This commit is contained in:
18
src/Pattern/ProjectZomboid/CmdPattern.php
Normal file
18
src/Pattern/ProjectZomboid/CmdPattern.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace IndifferentKetchup\Codex\Pattern\ProjectZomboid;
|
||||
|
||||
/**
|
||||
* Regex constants for the Project Zomboid cmd.txt format.
|
||||
*
|
||||
* [time] steamid "player" command @ x,y,z.
|
||||
*
|
||||
* LINE captures, in order:
|
||||
* 1. time
|
||||
*/
|
||||
class CmdPattern
|
||||
{
|
||||
public const string LINE = '/^\[(\d{2}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{3})\] \d{17} "[^"]+" \S+ @ \d+,\d+,\d+\.$/';
|
||||
|
||||
public const string FIELDS = '/^\[\d{2}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{3}\] (?<steamid>\d{17}) "(?<player>[^"]+)" (?<command>\S+) @ (?<x>\d+),(?<y>\d+),(?<z>\d+)\.$/';
|
||||
}
|
||||
Reference in New Issue
Block a user