diff --git a/README.MD b/README.MD index 574163f..30a6316 100644 --- a/README.MD +++ b/README.MD @@ -1,4 +1,7 @@ # CS2 Server Control with a Nodejs-powered web-API (LINUX only) +this API is used to start/stop/update a CS2 linux dedicated server and control it via rcon. +The backend accepts RESTful api calls authenticated either via steamID or a configurable user with hppt authentication for stateless API calls. +A full featured example webinterface is provided to get a quick start on the application. ## Disclaimer The use of this software is at your own risk. diff --git a/modules/logreceive.js b/modules/logreceive.js index d0fbd07..f2cc6aa 100644 --- a/modules/logreceive.js +++ b/modules/logreceive.js @@ -84,13 +84,13 @@ router.post('/log', (req, res) => { if (cfg.script('matchEnd') != '') { exec(cfg.script('matchEnd')); } - } else if (/\".+<\d+><\[U:\d:\d+\]>/.test(line)) { + } else if (/\".{1,32}<\d{1,3}><\[\w:\d:\d{1,10}\]>/.test(line)) { // Player join or teamchange. // 10/12/2023 - 16:06:38: "[Klosser] Taraman<2><[U:1:12610374]><>" entered the game // 10/12/2023 - 18:57:47: "[Klosser] Taraman<2><[U:1:12610374]>" switched from team to // 10/12/2023 - 18:59:25: "[Klosser] Taraman<2><[U:1:12610374]>" switched from team to // 10/16/2023 - 16:31:59.699 - "[Klosser] Taraman<2><[U:1:12610374]>" disconnected (reason "NETWORK_DISCONNECT_DISCONNECT_BY_USER") - let rex = /\"(.+)<\d+><\[(U:\d+:\d+)\]><\[(\w:\d:\d{1,10})\]> { logger.debug(line); serverInfo.removePlayer(matches[2]); } else if (line.indexOf('switched from team') != -1) { - rex = /<\[(U:\d+:\d+)\]>.*switched from team <\S+> to <(\S+)>/g; + rex = /<\[(\w:\d:\d{1,10})\]>\" switched from team <\S{1,10}> to <(\S{1,10})>/g; matches = rex.exec(line); serverInfo.assignPlayer(matches[1], matches[2]); }