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

Ban, Kick & Warning Logs #146

Open
Thomas-Smyth opened this issue Feb 25, 2021 · 1 comment
Open

Ban, Kick & Warning Logs #146

Thomas-Smyth opened this issue Feb 25, 2021 · 1 comment
Labels
core feature request Feature request related to the core SquadJS API plugin feature request Feature request related to the SquadJS plugins

Comments

@Thomas-Smyth
Copy link
Collaborator

What is the issue, e.g. map voting, you would like to solve?

Logging of bans, kicks, warnings, etc.

How would you like us to solve this issue?

Use new RCON streaming functionality to collect this data.

Is there any alternative solutions you can think of?

Nope.

Additional Info

None.

@Thomas-Smyth Thomas-Smyth added core feature request Feature request related to the core SquadJS API plugin feature request Feature request related to the SquadJS plugins and removed core labels Mar 7, 2021
@ect0s
Copy link
Contributor

ect0s commented Jan 27, 2023

Matched warn message: Remote admin has warned player [TT]ect0s. Message was "testing test"
Unknown Chat Message "[TT]ect0s was kicked: testing test"
Matched kick message: Kicked player 2. [steamid=76561198129XXXXXX] [TT]ect0s
Matched ban message: N/A Banned player 2. [steamid=76561198129XXXXXX] [TT]ect0s for interval 290376528

Was thinking about this recently and did a bit of tinkering;

I've added an "unknown chat" fall through in the rcon chat message handler, and noticed for kick we do get a multicast response with the reason as well as a message with more specific information about the kick.

These appear to be sequential, so a little bit of state in the RCON handler like what we do with the log parser would let us wrap the two packets into one event before we emit it.

However, this is not the case for adminban (native bans), we only capture the generic message we already have a parser for; we would not have a "reason" field.

I assume we likely would want to log this via sequelize/some other ORM into a database (sqlite/mysql/mongo etc) as well as maybe a discord channel?

We do not gain information about the admin who took the action in most cases (perhaps on bans, the N/A will be filled in with information ect0s [SteamID 76561198129106XXX] Banned:.. if done via the console in game).

There may be something we can do via the logparser to figure out the "reason" on bans, but I'm not sure of how best to handle that;

2023.01.27-11.55.02:854][892]LogOnlineGame: Display: Banning player: ect0s ; Reason = testing test
[2023.01.27-11.55.02:855][892]LogTextFormatter: Warning: Failed to parse argument "BanReason" as a number (using "0" as a fallback). Please check your format string for errors: " : {BanReason}".
[2023.01.27-11.55.02:855][892]LogOnlineGame: Display: Kicking player: [TT]ect0s ; Reason = testing test
[2023.01.27-11.55.02:855][892]LogSquad: ADMIN COMMAND: N/A Banned player 2. [steamid=7656119812910XXXX] [TT]ect0s for interval 290376528 from RCON

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core feature request Feature request related to the core SquadJS API plugin feature request Feature request related to the SquadJS plugins
Projects
None yet
Development

No branches or pull requests

2 participants