Skip to content

Commit

Permalink
chore: minor stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
tabarra committed Dec 2, 2022
1 parent dfb5b47 commit 674e079
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .deploy.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
export default {
fxserverPath: 'E:\\FiveM\\BUILDS\\5848\\fxserver.exe',
fxserverPath: 'E:\\FiveM\\BUILDS\\6030\\fxserver.exe',
debouncerInterval: 250,
preReleaseExpirationDays: 21,
txAdminArgs: [
'+set', 'txAdminDevMode', 'true',
'+set', 'txAdminVerbose', 'true',
// '+set', 'txAdminPort', '40121',

//FIXME: broken
// '+set', 'txDebugPlayerlistGenerator', 'true',
Expand Down
2 changes: 1 addition & 1 deletion core/webroutes/player/checkJoin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export default async function PlayerCheckJoin(ctx: Context) {
// If discord whitelist enabled
//TODO: add here discord whitelisting, don't interact with the code below

// If admin-only mode enabled
// If admin-only mode enabled (#516)
//TODO: easy to do, just need to figure out the UI

// If whitelist checking enabled
Expand Down
4 changes: 2 additions & 2 deletions docs/dev_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ TODO for beta2:
- [x] fix car boost func (double + veh type check)
- [x] fix csrf
- [x] force `txAdminAPI` to have `dataType: 'json'` for all calls
- [ ] write changelog + announcement
- [ ] announce to top servers
- [x] write changelog + announcement
- [x] announce to top servers

The diagnostics reporting button thing (2d?):
- [ ] do frontend button + modals
Expand Down
43 changes: 42 additions & 1 deletion quick_playerlist_tester.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@
padding: 1em;
}

.playerlistCard {
display: flex;
flex-direction: column;
background-color: rgb(250, 210, 250);
padding: 1em;
}

.playerData {
width: 475px;
height: 200px;
Expand Down Expand Up @@ -63,14 +70,24 @@
</div>
</div>


</div>

<div class="playersRow">
<div class="playerlistCard">
<textarea class="playerData" id="playerlistInput"></textarea>
<div class="playerButtons">
<button onclick="copyPlayerlist()">Apply Playerlist</button>
</div>
</div>
</div>
</body>
<script>
const el = (id) => document.getElementById(id);
const initialData1 = {
"name": "Tabarra",
"ids": [
"license:9b9fc300cc65d22ad3b536175a4d15c0e4933700",
"license:9b9fc300cc65d22ad3b536175a4d15c0e4933753",
"fivem:271816",
"ip:0.0.0.1"
],
Expand Down Expand Up @@ -145,4 +162,28 @@
console.log(error);
}
}

async function copyPlayerlist(){
const playerlist = JSON.parse(el('playerlistInput').value);
for (const player of playerlist) {
const eventData = {
type: "txAdminPlayerlistEvent",
event: 'playerJoining',
id: player.id,
player: {
name: player.name,
ids: [...player.identifiers, `ip:${player.endpoint}`],
hwids: [],
},
}
try {
const resp = await sendPost('event', eventData);
console.log(resp);
} catch (error) {
console.log(eventData);
console.log(error);
}
}
console.log(playerlist.length);
}
</script>

0 comments on commit 674e079

Please sign in to comment.