Go to file
dependabot[bot] 9aa1fb0474
Bump actions/setup-python from 5 to 6 (#54)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-30 23:29:14 +01:00
.github Bump actions/setup-python from 5 to 6 (#54) 2025-10-30 23:29:14 +01:00
buildbot Add x64 support 2024-02-08 23:09:08 +01:00
extension fix offset usage for BeginAuthSession from #45 (resolves #49) (#52) 2025-05-23 19:07:06 -04:00
.gitignore feat: update sdks, builders, ci (#31) 2025-02-22 14:23:43 -05:00
AMBuildScript feat: update sdks, builders, ci (#31) 2025-02-22 14:23:43 -05:00
build.bat Initial commit. 2011-07-19 17:07:38 +01:00
configure.py Setup action build & upload 2023-02-25 02:53:16 +01:00
connect.games.txt Update for May 2025 tf2 updates 2025-05-15 23:12:03 -04:00
connect.inc Finish updating to newdecls (#9) 2021-10-23 21:51:38 +00:00
connect.sp Finish updating to newdecls (#9) 2021-10-23 21:51:38 +00:00
product.version Update product.version 2024-05-02 17:59:35 -04:00
README.md Update README.md 2025-05-15 22:54:42 -04:00
upload.py Updated build scipts. 2013-05-04 16:45:51 +01:00

Connect - A safer OnClientPreConnect forward

This extension provides a OnClientPreConnect forward (similar to CBaseServer's), but does proper checking to prevent malicious people spoofing SteamIDs.

If you are currently using CBaseServer for reserved slots, it's possible for a client to spoof an admin's SteamID and cause someone to be kicked from the server (although they would be later denied, so they couldn't actually join the game). This extension does these checks before OnClientPreConnect is fired, so this isn't possible.

There are some additional features such as being able to change the password provided before it's checked (see included example plugin) and the ability to reject the client with a reason (like SourceMod's later OnClientConnect forward).

Only the Source 2009 engine is supported, as it's the only one that's been updated to use the new authentication system.

Provided forwards

public bool OnClientPreConnectEx
(
  const char[] name,
  char password[255],
  const char[] ip,
  const char[] steamID,
  char rejectReason[255]
)
{
    // ...
}

return false; to disallow the client from joining, and change rejectReason to what you want them to be shown when denied.

Note that this function is called before the client has a client index on the server.

Builds