This custom package provides ConnectFilter decorator that will allow you to reject clients on early stages of the connection process.
Huge thanks to Ayuto for diving into Source authentication and finding out how to obtain unvalidated SteamID right when the client connects.
Syntax: Select all
from connect_filter import ConnectFilter
# Check client's (unvalidated!) SteamID
if client.steamid == "STEAM_1:1:60368989":
# Reject the client
return "You're not allowed around here"
# Don't reject
- Download the latest development snapshot of this package
- Extract contents of the SP-ConnectFilter-master directory to your mod folder