Skip to content

Commit

Permalink
fix(core): added playerIds/playerHwids into events
Browse files Browse the repository at this point in the history
  • Loading branch information
tabarra committed May 9, 2023
1 parent eb31990 commit e1a86e7
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion core/webroutes/databaseActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ async function handleBandIds(ctx: Context, sess: any): Promise<GenericApiResp> {
durationTranslated,
targetNetId: null,
targetIds: identifiers,
targetHwids: [],
targetName: 'identifiers',
kickMessage,
});
Expand Down Expand Up @@ -179,7 +180,8 @@ async function handleRevokeAction(ctx: Context, sess: any): Promise<GenericApiRe
actionReason: action.reason,
actionAuthor: action.author,
playerName: action.playerName,
playerIds: action.identifiers,
playerIds: action.ids,
playerHwids: action.hwids ?? [],
revokedBy: sess.auth.username,
});
} catch (error) { }
Expand Down
1 change: 1 addition & 0 deletions core/webroutes/player/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ async function handleBan(ctx: Context, sess: any, player: PlayerClass): Promise<
durationTranslated,
targetNetId: (player instanceof ServerPlayer) ? player.netid : null,
targetIds: player.ids,
targetHwids: player.hwids,
targetName: player.displayName,
kickMessage,
});
Expand Down
2 changes: 2 additions & 0 deletions docs/dev_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@
- [x] find out where that .replxx_history is comming from

> beta release
- [x] fix system log page font fallback
- [x] fix playerBanned and actionRevoked events playerIds and add playerHwids
- [ ] Update discord.js... AGAIN!
- [ ] inject consts isZapHosting and isPterodactyl in ctxUtil
- [ ] stats:
Expand Down
2 changes: 2 additions & 0 deletions docs/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Event Data:
- `durationTranslated`: xxx or `null`. Added in v5.0.
- `targetNetId`: The netid of the player that was banned, or `null` if a ban was applied to identifiers only. Added in v5.0.
- `targetIds`: The identifiers that were banned. Added in v5.0.
- `targetHwids`: The hardware identifiers that were banned. Might be an empty array. Added in v6.0.
- `targetName`: The clean name of the banned player, or `identifiers` if ban was applied to ids only (legacy ban). Added in v5.0.
- `kickMessage`: The message to show the player as a kick reason. Added in v5.0.

Expand Down Expand Up @@ -111,6 +112,7 @@ Event Data:
- `actionAuthor`: The name of the admin that issued the action.
- `playerName`: name of the player that received the action, or `false` if doesn't apply.
- `playerIds`: Array containing all identifiers (ex. license, discord, etc.) this action applied to.
- `playerHwids`: Array containing all hardware ID tokens this action applied to. Might be an empty array. Added in v6.0.
- `revokedBy`: The name of the admin that revoked the action.

## txAdmin:events:skippedNextScheduledRestart (v5.2)
Expand Down
2 changes: 1 addition & 1 deletion fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
author 'Tabarra'
description 'Remotely Manage & Monitor your GTA5 FiveM Server'
repository 'https://github.com/tabarra/txAdmin'
version '6.0.0-beta1'
version '6.0.0-beta2'
ui_label 'txAdmin'

rdr3_warning 'I acknowledge that this is a prerelease build of RedM, and I am aware my resources *will* become incompatible once RedM ships.'
Expand Down

0 comments on commit e1a86e7

Please sign in to comment.