In-Server Player Database

    Joined
    Aug 30, 2014
    Messages
    2
    Reaction score
    5
    Apart from the Current players online on tab, for admins it would be very useful to have a UI to see a list of all players who have connected to the server possibly between time frames and sort out the information by faction, name, IP, starmade name as player info stores recent connections. An admin could cross reference starmade names and see if people are using multiple accounts if that server has rules against that and/or the use of dummy factions to take advantage of multiple home bases. One could quickly check in game credit amounts, could help catch possible cheaters and exploiters, plus the IP is there and admin could IP ban if needed to. Currently the only way an admin in game can see the info of a player is putting /player_info, in conjunction with looking up what members of a faction they will look into, that works fine but it takes time to write down all info and factions change and new players are added. Any feedback would be lovely.
     

    therimmer96

    The Cake Network Staff Senior button unpusher
    Joined
    Jun 21, 2013
    Messages
    3,603
    Reaction score
    1,053
    Apart from the Current players online on tab, for admins it would be very useful to have a UI to see a list of all players who have connected to the server possibly between time frames and sort out the information by faction, name, IP, starmade name as player info stores recent connections. An admin could cross reference starmade names and see if people are using multiple accounts if that server has rules against that and/or the use of dummy factions to take advantage of multiple home bases. One could quickly check in game credit amounts, could help catch possible cheaters and exploiters, plus the IP is there and admin could IP ban if needed to. Currently the only way an admin in game can see the info of a player is putting /player_info, in conjunction with looking up what members of a faction they will look into, that works fine but it takes time to write down all info and factions change and new players are added. Any feedback would be lovely.
    Starmote does this, its just broken and buggy as shit
     
    Joined
    Aug 30, 2014
    Messages
    2
    Reaction score
    5
    I'm aware of Starmote, it's a shame that it is broken and buggy as I have tried. If it were to be fixed it would be very useful or if it was accessible in a UI from within the server itself.
     

    Doomsider

    Server scriptologist
    Joined
    Jan 21, 2013
    Messages
    215
    Reaction score
    43
    Yes I agree this is important. I wrote a couple of different scripts that deal with this by parsing the player files for IP related to each name. It works fine ofc but a bit hacky.

    My new solution for Shadow is to just create a database in Mysql and just record every time someone logs on with their name, IP, and then a time-stamp. Once it is in Mysql you can cross check the data easily.

    EDIT: In case you are wondering this is a link to Shadow which still contains the legacy code for banhammer command. https://github.com/doomsider/shadow

    BANARRAY=0
    # Get the banhammer name from the chat command
    BANHAMMERNAME=$2
    echo "$BANHAMMERNAME is getting banned"
    lib_screensend $CONFIGDTSD_MAINSCREEN /ban_name $BANHAMMERNAME
    # Added a kick as requested by BDLS
    lib_screensend $CONFIGDTSD_MAINSCREEN /kick $BANHAMMERNAME
    # Create the temporary file string
    BANFILESTRING="$CONFIGDTSD_INSTALLPATH/StarMade/server-database/ENTITY_PLAYERSTATE_player.ent"
    # Edit the file string with the playername to find the actual entity playerstate file
    BANFILENAME=${BANFILESTRING/player/$BANHAMMERNAME}
    echo "We are are looking for this player entity file $BANFILENAME"
    # Grab all the Ip's for the banned player as an array
    BANHAMMERIP=( $(cat $BANFILENAME | strings | grep -v null | grep \/ | cut -d\/ -f2) )
    # Calculate the array total for debugging purposes
    BANIPTOTAL=$(( ${#BANHAMMERIP[@]} ))
    echo "$BANIPTOTAL total IP addresses to ban"
    # Check for the filename
    if [ -e $BANFILENAME ]
    then
    # While there is still a value in the array
    while [ -n "${BANHAMMERIP[$BANARRAY]+set}" ]
    do
    # Set the current IP to be banned to Bannedip
    BANNEDIP=${BANHAMMERIP[$BANARRAY]}
    echo "Banning $BANNEDIP"
    # Ban that IP
    lib_screensend $CONFIGDTSD_MAINSCREEN /ban_ip $BANNEDIP
    # Keep from spamming commands to fast to server
    sleep 1
    # Add 1 to the array
    let BANARRAY++
    done
    # If no file is found
    else
    echo "No player entity file found"
    fi
     
    Last edited:
    Joined
    Jan 5, 2015
    Messages
    11
    Reaction score
    1
    Yea, they really need to work on getting StarMote working properly. It's the only real tool as an admin we have to do anything without actually going in the game and using typed commands.
     

    Doomsider

    Server scriptologist
    Joined
    Jan 21, 2013
    Messages
    215
    Reaction score
    43
    Yeah that would be nice. I mean the best way would be to have access to the actual sql system Schema uses through a MOD api that way players could just write their own Starmote or change it to suit their needs. Until then I will keep working on Shadow which will eventually reach the point of having a web panel type interface.