SquadJS
SquadJS copied to clipboard
Ban, Kick & Warning Logs
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.
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