Skip to content

Conversation

@TurtIeSocks
Copy link
Collaborator

@TurtIeSocks TurtIeSocks commented Oct 14, 2022

image

Important

  • REQUIRES ADJUSTMENTS IF YOU USE A CUSTOM STRATEGY, see the changes to the files in server/src/strategies

Other notes

  • Version bump
  • Add thumbnailUrl to discord strategy object
  • pass full req.user to scanner api
  • Initialize strategies in a separate file for dynamically collecting all clients
  • Rudimentary cache for storing # of requests for users in a given day
  • Log to the same channel as authentication reqs
  • Remove unused accessToken arg
  • Save logChanneld in the class instance
  • Remove user info from frontend, collect from request instead

- Version bump
- Add thumbnailUrl to discord strategy object
- pass full req.user to scanner api
- Initialize strategies in a separate file for dynamically collecting all clients
- Rudimentary cache for storing # of requests for users in a given day
- Log to the same channel as authentication reqs
- Remove unused accessToken arg
- Save logChanneld in the class instance
- Remove user info from frontend, collect from request instead
- REQUIRES ADJUSTMENTS IF YOU USE A CUSTOM STRATEGY
@kamieniarz
Copy link
Contributor

  1. When that request count resets (if it does)?
  2. Can we have separate log channel for that?

@AppIe314
Copy link
Contributor

I've just skimmed through the PR. Should the coords payload be trimmed if it exceeds something like 10 coords? IIRC scanZone has up to 300+ requests (which is a coordinate?) so the Discord message could be very long.

@TurtIeSocks
Copy link
Collaborator Author

@kamieniarz
Resets once a day or whenever the map server is reset. It's a rudimentary implementation that's mostly meant for observing very obvious signs of abuse. At this point, just putting off any significant logging implementation until a rewrite.

...separate channels are quite annoying due to custom/multiple auth strategies.

@AppIe314
Coords are trimmed after 25:

.filter((_c, i) => i < 25)

@TurtIeSocks TurtIeSocks changed the title Scan Next/Zone Discord Loggin Scan Next/Zone Discord Logging Oct 14, 2022
- Allow separate channels
- Some embed changes
- GH link in log message for old auth strategies
@TurtIeSocks TurtIeSocks merged commit 4a4c672 into develop Oct 14, 2022
@TurtIeSocks TurtIeSocks deleted the scan-next-discord-logging branch October 14, 2022 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants