Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improve player connection log parsing regex for mods #398

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ The following section of the configuration contains information about your Squad
* `rconPassword` - The RCON password of the server.
* `logReaderMode` - `tail` will read from a local log file, `ftp` will read from a remote log file using the FTP protocol, `sftp` will read from a remote log file using the SFTP protocol.
* `logDir` - The folder where your Squad logs are saved. Most likely will be `C:/servers/squad_server/SquadGame/Saved/Logs`.
* `ftp` - FTP configuration for reading logs remotely.
* `sftp` - SFTP configuration for reading logs remotely.
* `ftp` - FTP configuration for reading logs remotely. Only required for `ftp` `logReaderMode`.
* `sftp` - SFTP configuration for reading logs remotely. Only required for `sftp` `logReaderMode`.
* `adminLists` - Sources for identifying an admins on the server, either remote or local.

---
Expand Down
2 changes: 1 addition & 1 deletion squad-server/log-parser/player-connected.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { iterateIDs, lowerID } from 'core/id-parser';

export default {
regex:
/^\[([0-9.:-]+)]\[([ 0-9]*)]LogSquad: PostLogin: NewPlayer: BP_PlayerController_C .+PersistentLevel\.([^\s]+) \(IP: ([\d.]+) \| Online IDs:([^)|]+)\)/,
/^\[([0-9.:-]+)]\[([ 0-9]*)]LogSquad: PostLogin: NewPlayer: BP_PlayerController[^\s]+ .+PersistentLevel\.([^\s]+) \(IP: ([\d.]+) \| Online IDs:([^)|]+)\)/,
onMatch: (args, logParser) => {
const IDs = {};
iterateIDs(args[5]).forEach((platform, id) => {
Expand Down