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

add time variables on emit 'cvar' #4

Open
hookro opened this issue Jun 6, 2020 · 1 comment
Open

add time variables on emit 'cvar' #4

hookro opened this issue Jun 6, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@hookro
Copy link

hookro commented Jun 6, 2020

const cvar = (line) => {
    //log L 12/16/2019 - 22:20:09: Server cvar "mp_friendlyfire" = "0"
    const items = line.match(
      /log L ([0-9]{2})\/([0-9]{2})\/([0-9]{4}) - ([01]?\d|2[0-3]):([0-5]\d):([0-5]\d): Server cvar "(.+)" = "(.*)"/i
    );
    return {
	event: "cvar",
	cvarName: items[7],
	cvarValue: items[8],
	time: {
		ss: items[6],
		mm: items[5],
		hh: items[4]
	},
	date: {
		dd: items[2],
		mm: items[1],
		yy: items[3]
	}
    };
};
@hookro
Copy link
Author

hookro commented Jun 6, 2020

And an extension of this would be if the cVAR was modified by an admin and who. or it's just server.cfg reloading after changing map.

@kallefrombosnia kallefrombosnia self-assigned this Jun 6, 2020
@kallefrombosnia kallefrombosnia added the enhancement New feature or request label Jun 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants