Changeset 294


Ignore:
Timestamp:
Oct 6, 2016, 4:45:58 PM (6 years ago)
Author:
alloc
Message:

Scripts 103

Location:
scripts/usr/local/lib/7dtd
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • scripts/usr/local/lib/7dtd/VERSION

    r275 r294  
    1 Version: 101
    2 Release: 2016-05-17
     1Version: 103
     2Release: 2016-10-06
    33
  • scripts/usr/local/lib/7dtd/commands/start.sh

    r261 r294  
    5656                SSD_DAEMON="--background --no-close"
    5757                SSD_USER="--chuid $SDTD_USER:$SDTD_GROUP --user $SDTD_USER"
    58                 OPTS="-logfile $LOG -configfile=$(getInstancePath $1)/config.xml"
     58                OPTS="-logfile $LOG -nographics -configfile=$(getInstancePath $1)/config.xml"
    5959               
    6060                if [ "$(uname -m)" = "x86_64" ]; then
  • scripts/usr/local/lib/7dtd/monitor-log.sh

    r275 r294  
    3939        local steamId="$3"
    4040        local ip="$4"
     41        local ownerId="$5"
    4142       
    42         logPlayerConnect $INSTANCE "$entityId" "$name" "$steamId" "$ip"
     43        logPlayerConnect $INSTANCE "$entityId" "$name" "$steamId" "$ip" "$ownerId"
    4344
    4445        for H in $(getHooksFor playerConnect $INSTANCE); do
    45                 $H $INSTANCE "$entityId" "$name" "$steamId" "$ip"
     46                $H $INSTANCE "$entityId" "$name" "$steamId" "$ip" "$ownerId"
    4647        done
    4748}
     
    121122while read line ; do
    122123        if [ -n "$line" ]; then
    123                 #Player connected, entityid=1278, name=termo2, steamid=76561197997439820, ip=178.203.27.140
    124                 #Player connected, entityid=[0-9]*, name=.*, steamid=[0-9]*, ip=[0-9.]*$
     124                #Player connected, entityid=1278, name=termo2, steamid=76561197997439820, steamOwner=76561197997439820, ip=178.203.27.140
     125                #Player connected, entityid=[0-9]*, name=.*, steamid=[0-9]*, steamOwner=[0-9]*, ip=[0-9.]*$
    125126                if [ -n "$(echo "$line" | grep '^Player connected,')" ]; then
    126                         entityId=$(expr "$line" : 'Player connected, entityid=\([0-9]*\), name=.*, steamid=[0-9]*, ip=[0-9.]*$')
    127                         playerName=$(expr "$line" : 'Player connected, entityid=[0-9]*, name=\(.*\), steamid=[0-9]*, ip=[0-9.]*$')
    128                         steamId=$(expr "$line" : 'Player connected, entityid=[0-9]*, name=.*, steamid=\([0-9]*\), ip=[0-9.]*$')
    129                         ip=$(expr "$line" : 'Player connected, entityid=[0-9]*, name=.*, steamid=[0-9]*, ip=\([0-9.]*\)$')
     127                        entityId=$(expr "$line" : 'Player connected, entityid=\([0-9]*\), name=.*, steamid=[0-9]*, steamOwner=[0-9]*, ip=[0-9.]*$')
     128                        playerName=$(expr "$line" : 'Player connected, entityid=[0-9]*, name=\(.*\), steamid=[0-9]*, steamOwner=[0-9]*, ip=[0-9.]*$')
     129                        steamId=$(expr "$line" : 'Player connected, entityid=[0-9]*, name=.*, steamid=\([0-9]*\), steamOwner=[0-9]*, ip=[0-9.]*$')
     130                        steamOwner=$(expr "$line" : 'Player connected, entityid=[0-9]*, name=.*, steamid=[0-9]*, steamOwner=\([0-9]*\), ip=[0-9.]*$')
     131                        ip=$(expr "$line" : 'Player connected, entityid=[0-9]*, name=.*, steamid=[0-9]*, steamOwner=[0-9]*, ip=\([0-9.]*\)$')
    130132                        sleep 1
    131                         handleConnect "$entityId" "$playerName" "$steamId" "$ip"
    132                         unset entityId playerName steamId ip
     133                        handleConnect "$entityId" "$playerName" "$steamId" "$ip" "$steamOwner"
     134                        unset entityId playerName steamId steamOwner ip
    133135                else
    134136                #Player disconnected: EntityID=[0-9]*, PlayerID='[0-9]*', OwnerID='[0-9]*', PlayerName='.*'$
  • scripts/usr/local/lib/7dtd/playerlog.sh

    r258 r294  
    4949#   3: Steam ID
    5050#   4: Nick name
     51#   5: IP
     52#   6: Steam Owner ID
    5153logPlayerConnect() {
    5254        local ENTITYID="$2"
     
    5456        local STEAMID="$4"
    5557        local IP="$5"
     58        local OWNERID="$6"
    5659
    57         echo "$(timestamp) +++ $ENTITYID $NICKNAME $STEAMID $IP" >> "$PLAYERSLOG"
     60        echo "$(timestamp) +++ $ENTITYID $NICKNAME $STEAMID $IP $OWNERID" >> "$PLAYERSLOG"
    5861
    5962        createPlayerList
     
    7275                        -i "$XPATHBASE" -t attr -n "entityid" -v "$ENTITYID" \
    7376                        -i "$XPATHBASE" -t attr -n "lastIp" -v "$IP" \
     77                        -i "$XPATHBASE" -t attr -n "steamOwner" -v "$OWNERID" \
    7478                        "$PLAYERSXML"
    7579        else
     
    8387                        -u "$XPATHBASE/@logins" -v "$LOGINS" \
    8488                        -u "$XPATHBASE/@lastIp" -v "$IP" \
     89                        -u "$XPATHBASE/@steamOwner" -v "$OWNERID" \
    8590                        "$PLAYERSXML"
    8691        fi
  • scripts/usr/local/lib/7dtd/serverconfig.sh

    r262 r294  
    133133}
    134134serverconfig_GameWorld_Values() {
    135         config_allowed_values=("Random Gen" "Navezgane" "MP Wasteland Horde" "MP Wasteland Skirmish" "MP Wasteland War")
     135        config_allowed_values=("Random Gen" "Navezgane") #  "MP Wasteland Horde" "MP Wasteland Skirmish" "MP Wasteland War"
    136136}
    137137
     
    230230}
    231231serverconfig_DayNightLength_Default() {
    232         echo "40"
    233 }
    234 
    235 
    236 
    237 serverconfig_FriendlyFire_QueryName() {
    238         echo "Friendly fire"
    239 }
    240 serverconfig_FriendlyFire_Type() {
     232        echo "50"
     233}
     234
     235
     236
     237serverconfig_DayLightLength_QueryName() {
     238        echo "Duration of daylight (in ingame hours)"
     239}
     240serverconfig_DayLightLength_Type() {
     241        echo "number"
     242}
     243serverconfig_DayLightLength_Default() {
     244        echo "18"
     245}
     246serverconfig_DayLightLength_Range() {
     247        echo "0-24"
     248}
     249
     250
     251
     252serverconfig_PlayerKillingMode_QueryName() {
     253        echo "Player killing"
     254}
     255serverconfig_PlayerKillingMode_Type() {
     256        echo "enum"
     257}
     258serverconfig_PlayerKillingMode_Default() {
     259        echo "3"
     260}
     261serverconfig_PlayerKillingMode_Values() {
     262        config_allowed_values=("No player killing" "Kill allies only" "Kill strangers only" "Kill everyone")
     263}
     264
     265
     266
     267serverconfig_PersistentPlayerProfiles_QueryName() {
     268        echo "Persistent player profiles"
     269}
     270serverconfig_PersistentPlayerProfiles_Type() {
    241271        echo "boolean"
    242272}
    243 serverconfig_FriendlyFire_Default() {
     273serverconfig_PersistentPlayerProfiles_Default() {
    244274        echo "false"
    245275}
    246 serverconfig_FriendlyFire_ErrorMessage() {
     276serverconfig_PersistentPlayerProfiles_ErrorMessage() {
    247277        echo "Not a valid boolean given (true/false or yes/no or y/n)."
    248278}
    249279
     280
     281
     282serverconfig_PlayerSafeZoneLevel_QueryName() {
     283        echo "Safe zone up to player level"
     284}
     285serverconfig_PlayerSafeZoneLevel_Type() {
     286        echo "number"
     287}
     288serverconfig_PlayerSafeZoneLevel_Default() {
     289        echo "5"
     290}
     291
     292
     293serverconfig_PlayerSafeZoneHours_QueryName() {
     294        echo "Safe zone up to played hours"
     295}
     296serverconfig_PlayerSafeZoneHours_Type() {
     297        echo "number"
     298}
     299serverconfig_PlayerSafeZoneHours_Default() {
     300        echo "5"
     301}
    250302
    251303
     
    418470
    419471
    420 serverconfig_DayLightLength_QueryName() {
    421         echo "Day length"
    422 }
    423 serverconfig_DayLightLength_Type() {
    424         echo "number"
    425 }
    426 serverconfig_DayLightLength_Default() {
    427         echo "18"
    428 }
    429 serverconfig_DayLightLength_Range() {
    430         echo "0-24"
    431 }
    432 
    433 
    434 
    435472serverconfig_BlockDurabilityModifier_QueryName() {
    436473        echo "Block durability (%)"
     
    555592
    556593
     594serverconfig_AirDropMarker_QueryName() {
     595        echo "Enable AirDrop markers"
     596}
     597serverconfig_AirDropMarker_Type() {
     598        echo "boolean"
     599}
     600serverconfig_AirDropMarker_Default() {
     601        echo "false"
     602}
     603serverconfig_AirDropMarker_ErrorMessage() {
     604        echo "Not a valid boolean given (true/false or yes/no or y/n)."
     605}
     606
     607
     608
    557609serverconfig_MaxSpawnedZombies_QueryName() {
    558610        echo "Maximum number of concurrent zombies"
     
    563615serverconfig_MaxSpawnedZombies_Default() {
    564616        echo "60"
     617}
     618
     619
     620serverconfig_MaxSpawnedAnimals_QueryName() {
     621        echo "Maximum number of concurrent animals"
     622}
     623serverconfig_MaxSpawnedAnimals_Type() {
     624        echo "number"
     625}
     626serverconfig_MaxSpawnedAnimals_Default() {
     627        echo "50"
    565628}
    566629
     
    592655        for CV in \
    593656                        ServerName ServerPassword ServerIsPublic ServerPort ServerMaxPlayerCount ServerDescription ServerWebsiteURL \
    594                         EACEnabled MaxSpawnedZombies \
     657                        EACEnabled MaxSpawnedZombies MaxSpawnedAnimals \
    595658                        ; do
    596659                $1 $CV
     
    639702        echo "--------------------------------"
    640703        for CV in \
    641                         FriendlyFire BuildCreate \
     704                        PlayerKillingMode PersistentProfiles \
     705                        PlayerSafeZoneLevel PlayerSafeZoneHours \
     706                        BuildCreate \
    642707                        BlockDurabilityModifier \
    643708                        ; do
     
    654719        for CV in \
    655720                        DropOnDeath DropOnQuit \
    656                         LootAbundance LootRespawnDays AirDropFrequency \
     721                        LootAbundance LootRespawnDays \
     722                        AirDropFrequency AirDropMarker \
    657723                        ; do
    658724                $1 $CV
Note: See TracChangeset for help on using the changeset viewer.