Disconnected Player History

There should be, by default, a history of players who have been disconnected on clients.

Trying to hunt for some asshole’s SteamID in console/chat so you can ban him for aimbotting everyone(or whatever else) and leaving before you can react is balls.

Having to edit(and maintain your edit of, or make a pull request to) a gamemode so you can easily right click them on the “Disconnected” section of the scoreboard in order to ban them or at least grab their SteamID is also balls.

Code example:

// Getting information.
DisconnectedPlayers dcPlayers = Player.GetDisconnected();
var id = dcPlayers[0].SteamID();
var plUID = dcPlayers[0].UniqueID();
var plName = dcPlayers[0].Name();
var plScore = dcPlayers[0].Score();
var plLeftTime = dcPlayers[0].LeaveTime();
// For when a user doesn't need to see them anymore.
// For when a user wants to clean up this information.
// Ran on start for users that would prefer not to have clutter.
// Clicking the "Disconnected" label(or an adjacent button) would toggle the CVar too.
Scoreboard.SetCollapsed("lang_sb_disconnected", CVar.GetBool("cl_sb_disconnected_hide"));

Implementing this in the base gamemode(and all included gamemodes) would help make this a standard and give an example that can be copied. It’s a quality of life feature we should not have to go without in my opinion.

Optionally when the client joins you could network to the client the last 5(or so) players who left before the client joined, for cases where an admin is called and loads in afterwards.

Standardizing is great until it doesn’t fit someone’s specific usage. Then they are going to re-create the standard and the cycle will repeat. I’m all for keeping some form of data archived but this doesn’t seem like the most complicated thing for a dev to handle. Choosing WHAT data needs to be saved is case by case and would be better as an implementation by the addon/gamemode dev. Also trusting the garbage collection to the dev with the forgets seems dangerous.

I’m thinking even in GMod you have a player disconnected hook that you can just pull and archive data for.

I’m not against the idea as a whole, I just don’t see how someone wouldn’t be able to handle this on their own. It might be better time spent requesting things within Source 2 we couldn’t access without the team exposing it.


You can just extend what information is saved using features in C#, and it can be implemented any which way.
The scoreboard interaction code was an example of how you could implement it onto anything. I don’t know why you’d throw out something so basic.

It’s something you can code in an hour, but sadly it’s not a feature of at least 9/10 servers I’ve played. Out of the gate the client just can’t remember anything about the player’s they’ve seen and that’s odd to me. It makes a major difference in how easy moderation is.

It importantly makes it much easier for players to report other players, and would work well even for example on a competitive/matchmaking server that’s barebones for a good reason. Otherwise you’d have to use Steam’s “recently played with” or hope the SteamID is in your console so you can painfully sift through it.

About memory management, the Forget method is simply for the client to free up the UI real estate on their scoreboard to make things visually tidy. The DisconnectedPlayers list could be limited to 128 players(beyond what you’d realistically need) and the DisconnectedPlayer struct is so lightweight that a few megabytes surely wouldn’t make much difference anyhow.
Release of external data like profile pictures for example would be handled fine.

1 Like

Honestly feels a bit useless. If you need to do it yourself you can keep track of it quite easily and there is absolutely no reason to standardise it in my opinion.


The repressed pain of a thousand games of “hunt for the SteamID in console” is screaming at you from my brain.

Allow me to introduce searchable logs. Or, as I said - make it yourself. I just said it’s useless to make standard.


I can sort of see the bigger picture now. You’re definitely right that not a lot of servers build up on it currently, but just because you add something in as a default doesn’t mean it will get used at all. Otherwise I think if a dev thought it was needed they would spend that hour and write it in. It wouldn’t be enough to have the back end only, it would likely need to ALSO be implemented functionally by default too like your scoreboard idea.

A lot of it is going to hang on exactly how much administration @garry is thinking on adding. Maybe what you requested might already be in the pipe judging from this post:

If we assume that’s the case then:

This is probably the big appeal above all else. Server Devs extend the class with methods they need uniquely and then have their player classes use their extended “DisconnectedPlayer” classes instead of the default. Similar to how garry’s implementation of the DevController works here: Noclip - how it works

Also I want to apologize for this part of my post as it came out as if I was shooting the idea down

I just want to “get to the bottom” of what you’re thinking and why it’s a problem, and the post could probably do without that line. if you took any offense that’s my bad.

1 Like

I let my feelings about how useful a feature it is(for me) cloud my judgement about how others might feel about it being standard.

After some thought I now believe you’re correct about letting other developers decide for themselves as they will anyhow.

And no offense taken, certainly. I hope it didn’t seem that way. Thanks for the polite and thoughtful response.