On a Team Fortress 2 server running SourceMod, ban a connected player with sm_ban <#userid|name> <minutes|0> [reason]. Use a positive number for a temporary ban and 0 for a permanent ban. For someone who is offline, use sm_addban <minutes|0> <steamid> [reason]. Remove a Steam ID or IP ban with sm_unban <steamid|ip>.
Playing with friends? Godlike.Host runs hosted Team Fortress 2 servers from 10 data-center locations, with free DDoS protection.
The reliable workflow is to identify the player from the server’s status output, prefer the player’s Steam-auth identity over an IP address, and use the command that matches whether the player is currently connected. SourceMod permissions are separate: banning requires the ban capability, unbanning requires the unban capability, and arbitrary IP bans or offline Steam-ID additions require RCON access where indicated by the command registration.
| # | Preview | Product | Price | |
|---|---|---|---|---|
| 1 |
|
Team Fortress 2 - PC (Collector's) | $24.95 | Buy on Amazon |
| 2 |
|
The Orange Box - PC | $33.93 | Buy on Amazon |
| 3 |
|
Team Fortress Classic | $37.18 | Buy on Amazon |
| 4 |
|
Island Fortress by Game Salute | $34.00 | Buy on Amazon |
| 5 |
|
Team Fortress 2 - Cartoonified Design Decal Sticker - Graphic for Auto, Wall, Laptop, Cell, Truck... | $1.99 | Buy on Amazon |
As an Amazon Associate I earn from qualifying purchases.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallWhat you need before issuing a ban
This procedure applies to a TF2 server with SourceMod installed and its basebans plugin available. The plugin registers the standard commands used here. Your account must also have the appropriate SourceMod administrator flag; being able to use one command does not automatically grant access to the others.
| Command | Use | Identity accepted | Privilege registered by SourceMod |
|---|---|---|---|
sm_ban |
Ban a connected client | Exact or unique name, #userid, or a connected player target |
Ban flag |
sm_unban |
Remove a ban | Steam ID or IP address | Unban flag |
sm_addban |
Add an offline Steam ID to the ban list | Steam ID | RCON access |
sm_banip |
Ban by IP, or resolve a connected target to an IP | IP, #userid, or name |
Ban flag; arbitrary IP input requires RCON access |
The command reference describes time in minutes. A value of 0 is the documented permanent-ban value; any positive value is a temporary duration in minutes. Keep the duration and the identity in the same command so there is no ambiguity about what is being applied.
#1 Best Overall
- Nine unique character classes, each providing a completely unique play experience for players of varying skills
- Advanced graphics that offers a unique game environment while providing game information within the visuals
- Support for up to 24 players
- Introduces new multiplayer game modes and support for voice chat
- Automatic updates – Stop wasting time looking for patches or new content
Identify the correct player first
Never rely on a similar-looking display name when a durable ban is intended. SourceMod can resolve an exact or unique name, a numeric user ID prefixed with #, or a Steam ID. The server’s status output is the safest place to inspect connected players and their identifiers before you act.
- Run
statusin the server command context available to you. - Find the player’s row and note the server-assigned user ID and the Steam-auth identity shown for that connection.
- Use the
#useridvalue for an immediate connected-player action when names are duplicated, changing, or difficult to type. - Use the Steam ID when you need to add a ban after the player has disconnected or when you want your records to identify the account rather than the current name.
Steam IDs commonly contain colons. The SourceMod command reference notes that a Steam ID containing colons should be quoted. In a command, represent it as "STEAM_X:Y:Z" with the actual value from your server, rather than removing the punctuation.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Ban a connected player with sm_ban
sm_ban is the shortest SourceMod workflow for a player who is currently on the server.
- Confirm the target. Use
statusand choose either the player’s#useridor an exact, unique name. - Choose the duration. Enter a positive number of minutes for a temporary ban, or
0for a permanent ban. - Add a concise reason. The optional reason is useful to administrators reviewing the ban later and to the player-facing message generated by the ban system.
- Run the command. Use the documented form
sm_ban <#userid|name> <minutes|0> [reason].
For example, this applies a 30-minute ban to user ID 42 for the stated reason:
sm_ban #42 30 repeated mic spam
For a permanent ban on the same connected target, replace 30 with 0:
sm_ban #42 0 repeated mic spam
Use a user ID rather than a name when the name contains spaces, when several players have similar names, or when you want to avoid targeting the wrong connection after a player joins or leaves. If the target disconnects before the command is processed, the connected-client command may no longer be the right operation; capture the Steam ID from status and use sm_addban instead.
Rank #2
- Characters - Advanced facial animation system delivers the most sophisticated in-game characters ever seen. With 40 distinct facial muscles, human characters convey the full array of human emotion, and respond to the player with fluidity and intelligence
- Physics - From pebbles to water to 2-ton trucks respond as expected, as they obey the laws of mass, friction, gravity, and buoyancy
- Graphics - Source's shader-based renderer, like the one used at Pixar to create movies such as Toy Story and Monster's, Inc., creates the most beautiful and realistic environments ever seen in a video game.
- AI - Neither friends nor enemies charge blindly into the fray. They can assess threats, navigate tricky terrain, and fashion weapons from whatever is at hand
Temporary versus permanent bans
The number in the duration position is not a date, a seconds value, or a duration label. SourceMod interprets it as minutes. The documented values work as follows:
| Duration entry | Meaning | Example |
|---|---|---|
5 |
Temporary ban for 5 minutes | sm_ban #42 5 disruptive voice chat |
30 |
Temporary ban for 30 minutes | sm_ban #42 30 repeated mic spam |
1440 |
Temporary ban for 1,440 minutes (24 hours) | sm_ban #42 1440 exploit abuse |
0 |
Permanent ban | sm_ban #42 0 repeated cheating |
Only the value 0 has the documented permanent meaning. Do not type a word such as permanent in the duration position. Put explanatory text after the numeric duration as the optional reason.
Add a ban for a player who is offline
If the player is no longer connected, use the Steam ID captured from an earlier status listing or another trusted server record:
sm_addban <minutes|0> <steamid> [reason]
For a temporary offline ban, supply the number of minutes. For a permanent offline ban, supply 0. A Steam ID with colons should be quoted, for example:
Recommended Free Tools
sm_addban 0 "STEAM_X:Y:Z" repeated exploit abuse
Replace the illustrative identity with the exact Steam ID belonging to the player. sm_addban is specifically for adding a Steam ID to Source’s ban list when the client is not available to be targeted by sm_ban. SourceMod registers this command with RCON access, so an administrator who has ordinary ban access but not RCON access may be unable to run it. In that case, do not substitute a name: obtain the required privilege or have an authorized operator perform the action.
When an IP ban is appropriate
SourceMod provides sm_banip for an IP identity or for a connected target that SourceMod can resolve to an IP:
Rank #3
sm_banip <ip|#userid|name> <minutes|0> [reason]
Examples using a connected user ID and an explicit IP target are:
sm_banip #42 60 automated attack trafficsm_banip 203.0.113.24 0 repeated connection abuse
The address in the second example is an illustration of the command shape; use the actual address shown by your server. The command reference warns that arbitrary IP banning requires RCON access. An IP is also a weaker long-term identity than a Steam-auth record: several people can share one public address, and an address can change. Use an IP ban as a targeted response to an address-based problem, not as the universal replacement for a Steam-ID ban.
Remove a Steam ID or IP ban
Use sm_unban with the identity that was banned:
sm_unban <steamid|ip>
For a Steam ID containing colons, preserve the full value and quote it:
sm_unban "STEAM_X:Y:Z"
An IP ban is removed by supplying the IP address instead:
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →sm_unban 203.0.113.24
SourceMod registers sm_unban with the unban capability, which is separate from the ban capability. If the command is rejected for permissions, an administrator who can ban may still need a distinct unban flag. Verify the identity carefully before removing a ban; a display name is not a valid argument for this command.
Rank #4
- For 2-4 players
- Ages 13 and up
- 90 minute playing time
Choose the right command
The following decision table covers the normal cases without mixing identities or privileges.
| Situation | Recommended command | Why |
|---|---|---|
| Player is connected and you have the ban flag | sm_ban #userid minutes reason |
Targets the current connection directly and accepts a temporary or permanent duration. |
| Player is connected, but the name is ambiguous | sm_ban #userid minutes reason |
A server-assigned user ID avoids choosing the wrong similarly named player. |
| Player is offline and you have the Steam ID | sm_addban minutes steamid reason |
Adds the Steam ID without requiring an active connection; SourceMod registers it for RCON access. |
| The incident is tied specifically to an IP address | sm_banip ip minutes reason |
Applies an IP identity, subject to the command’s RCON requirement for arbitrary addresses. |
| A previously banned identity should be restored | sm_unban steamid or sm_unban ip |
Removes the matching Steam ID or IP entry and requires the unban capability. |
Troubleshoot common failures
The command is unknown
Check that SourceMod is installed and that the basebans plugin is loaded. These commands are registered by that plugin; they are not presented here as vanilla TF2 commands. If the plugin is unavailable, installing or repairing SourceMod is a server-administration task rather than a syntax change.
You receive an access-denied response
Check the capability associated with the command. sm_ban and sm_banip use the ban flag, sm_unban uses the unban flag, and sm_addban is registered for RCON access. Having one permission does not prove that the others are present.
The server selects the wrong player
Stop using a name and repeat the lookup with status. Use the exact #userid from the current connection. A user ID is tied to that server session, so obtain a fresh value if the player leaves and rejoins.
The player disconnected before you could ban them
A connected-client target may no longer exist. If you recorded the Steam ID, switch to sm_addban and apply the intended minutes value or 0. Do not guess an identity from a similar display name.
The ban affects more people than intended
Review whether you used an IP ban. A shared network can place multiple players behind one address, and an address may later be reassigned. For a person-specific, durable action, use the verified Steam-auth identity whenever the situation allows.
Best Value
- Brand: decals
- Material: Vinyl
- Surface recommendation: Metal,Plastic
- Item shape: Rectangular
- Installation type: Stick
You expected a permanent ban but used another number
Only 0 is documented as permanent. Positive values are minutes, so replace an accidental temporary entry through your normal unban process and then issue the correct command with 0, subject to your server’s administrative policy.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →The Steam ID argument is not parsed correctly
Preserve every character, including colons, and quote the complete Steam ID. A missing character or misplaced quote can turn a valid identity into a different argument.
For plugin developers: the underlying SourceMod API
The command layer is backed by SourceMod’s ban API. BanClient handles a connected client, BanIdentity handles an authentication string or IP, and RemoveBan removes a ban written to memory or disk. The API documents the time parameter in minutes and uses 0 for a permanent ban, matching the command behavior described above.
This distinction matters when a custom administration plugin adds its own interface. A connected client can be passed through the client-oriented operation, while an offline Steam ID or an IP must be handled as an identity. A custom menu should still preserve the same safeguards: display the exact identity, distinguish temporary from permanent duration, require the appropriate capability, and record a reason.
Keep ban decisions auditable
A technically correct command can still produce an administrative problem if nobody can tell why it was used. Before pressing enter, apply a short checklist:
Free tools Windows power users keep installed
One-click scans. No signup required.
- Confirm the current connection with
status. - Copy the Steam ID or
#useridexactly; do not retype a long identity from memory. - Decide whether the event calls for minutes or a permanent value of
0. - Write a factual reason that identifies the behavior, not an insult or an uncertain accusation.
- Use a Steam-auth identity for an individual whenever possible; reserve IP bans for cases where the address itself is the relevant identity.
- Make sure your account has the command-specific capability before an incident occurs.
These checks reduce the two most costly errors: banning the wrong connection and applying a broader IP block than intended.
Command reference
| Goal | Syntax | Duration rule |
|---|---|---|
| Ban connected player | sm_ban <#userid|name> <minutes|0> [reason] |
Positive number is minutes; 0 is permanent. |
| Add offline Steam ID | sm_addban <minutes|0> <steamid> [reason] |
Positive number is minutes; 0 is permanent. |
| Ban by IP or connected target’s IP | sm_banip <ip|#userid|name> <minutes|0> [reason] |
Positive number is minutes; 0 is permanent. |
| Remove a ban | sm_unban <steamid|ip> |
Supply the exact Steam ID or IP; there is no duration argument. |
About vanilla Valve commands
There are discussions of a separate vanilla banid/writeid sequence, but the exact first-party Valve procedure is not established here. This guide therefore does not present that sequence as authoritative. For a documented, supported workflow on a SourceMod-equipped community server, use the basebans commands and permissions described above.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




