Improve regex for layer collection via RCON

This commit is contained in:
Thomas Smyth 2020-05-15 21:41:44 +01:00
parent f62e776dff
commit ef3184e41a

View File

@ -56,7 +56,7 @@ export default class Rcon {
async getMapInfo() { async getMapInfo() {
const response = await this.execute('ShowNextMap'); const response = await this.execute('ShowNextMap');
const match = response.match( const match = response.match(
/^Current map is ([A-z0-9 ]+), Next map is ([A-z0-9 ]*)/ /^Current map is (.+), Next map is (.*)/
); );
return { return {
currentLayer: match[1], currentLayer: match[1],