Skip to content

Validate clients#930

Open
lechuga16 wants to merge 2 commits intoSirPlease:masterfrom
lechuga16:fix/ratemonitor
Open

Validate clients#930
lechuga16 wants to merge 2 commits intoSirPlease:masterfrom
lechuga16:fix/ratemonitor

Conversation

@lechuga16
Copy link
Contributor

Add client validation to the ratemonitor.

Add client validation to the ratemonitor.
@A1mDev
Copy link
Contributor

A1mDev commented Mar 21, 2026

For what?

@SirPlease
Copy link
Owner

From checking ~900 log files, it seems that the user is sometimes no longer in-game when the timer triggers on the player_team timer.
Probably could be using a next frame rather than a timer and do a final check rather than having double checking like in the PR.

@lechuga16
Copy link
Contributor Author

From checking ~900 log files, it seems that the user is sometimes no longer in-game when the timer triggers on the player_team timer. Probably could be using a next frame rather than a timer and do a final check rather than having double checking like in the PR.

done

@A1mDev
Copy link
Contributor

A1mDev commented Mar 27, 2026

add a check to the event if (!hEvent.GetBool("disconnect")), this will be enough, I think the rest of the checks are redundant.

@A1mDev
Copy link
Contributor

A1mDev commented Mar 27, 2026

Some natives and forwards in sourcemod already have checks inside! Example: OnClientSettingsChanged, GetClientOfUserId. The client index must also be correct, otherwise there will be a crash in sourcemod.

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.

3 participants