midspace / midspace/Space-Engineers-Admin-script-mod

Player Login Log

Open
#129 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
43
Forks
12
PR merge metrics
No merged PRs in 30d

Description

First I want to take a moment to thank you guys for this awesome mod, I wouldn't even know where to begin making something like this and cant imagine running a server without it!

jpcsupplies mentioned wanting to determine the age of objects for clean-ups... #126. Another way of looking at ageing abandoned junk is determining when the owner was last present.

Log can be very light on information.

Player (steamid to ensure consistency and uniqeness)
faction(name/id/whatever) ..... to help check a grid against a faction
last login time
last seen time

Stored as xml for easy access/loading on server start.
Can record player's connection(or successful loading into) and disconnection to the server.
If the server doesn't see them leave (server resets/crashes with players connected)
-when the server loads up, compares last seen and last login times
-if they are the same then record the current time as last seen time (for safety if this is to be used for clean ups)

Then listships or a clean-up command can reference this to determine if the grids owner hasn't been on in two weeks, or if the grids faction...

I have the start of a clean-up command already etched out that ill show in a different issue. Includes a check for sub-type id/name with partial match. Calling your awesome getattachedgrids method (love it) once for each... "cluster" of grids.

At the moment its just (the player log) a thought, need to look into how to go about it.

Sandbox.Engine.Multiplayer.MyMultiplayerJoinResult.JoinDone();

at a glance looks promising for connections.

Disclaimer... I have only been looking at c# the past few months so if it looks like I doing something stupid don't be afraid to tell me so :D

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by investigating Sandbox.Engine.Multiplayer.MyMultiplayerJoinResult.JoinDone() and the mod's existing server lifecycle or command code. Define how player identity, faction, login, and last-seen data should be stored in XML and recovered after an unclean shutdown. Done means the log records connection and disconnection state reliably and can support later cleanup checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.