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

feat: cache data, small refactor, add steamid in banip, bugs fix #957

Merged
merged 2 commits into from
May 29, 2024

Conversation

Rushaway
Copy link
Contributor

@Rushaway Rushaway commented May 27, 2024

Description

  1. Cachae players data to make less repeatitive calls
  2. Prevent banning people without correct steamid format (can lead to create Sourcebans Ban list not showing anymore #912 || Fix: #900 & #906 #908 (comment))
  3. Add SteamID into CommandIP
  4. Small refacotring to match sbpp comms code style (A full refactor will come in another PR later)
  5. Improve string speed comparaison

Motivation and Context

  1. Less calls to get the same data, DRY the code.
  2. Fix Sourcebans Ban list not showing anymore #912
  3. While banning someone via IP, the steamid was never stored, it was no-sense, it easier to track a player banned (via the steamid in search function of the website instead of IP who can be dynamic for the same SteamID) + that also make the total bans counts correct
  4. After years and multiples PR from contributors, the global code style is different from one function to another
  5. strcmp is way faster than StrEqual (benchmarks was made)

How Has This Been Tested?

In use since 6 months on https://bans.nide.gg/

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.

Edit: My bad, I didnt pushed the latest version of the plugin, this is now solved.

@Hackmastr Hackmastr merged commit c5e5e59 into sbpp:php81 May 29, 2024
1 check passed
@Rushaway Rushaway deleted the patch-5 branch May 30, 2024 07:20
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.

Sourcebans Ban list not showing anymore
2 participants