Index: scripts/usr/local/lib/7dtd/monitor-log.sh
===================================================================
--- scripts/usr/local/lib/7dtd/monitor-log.sh	(revision 481)
+++ scripts/usr/local/lib/7dtd/monitor-log.sh	(revision 482)
@@ -37,23 +37,23 @@
 	local entityId="$1"
 	local name="$2"
-	local steamId="$3"
-	local ip="$4"
-	local ownerId="$5"
+	local platformId="$3"
+	local crossId="$4"
+	local ip="$5"
+	local ownerId="$6"
 	
-	logPlayerConnect $INSTANCE "$entityId" "$name" "$steamId" "$ip" "$ownerId"
+	logPlayerConnect $INSTANCE "$entityId" "$name" "$platformId" "$crossId" "$ip" "$ownerId"
 
 	for H in $(getHooksFor playerConnect $INSTANCE); do
-		$H $INSTANCE "$entityId" "$name" "$steamId" "$ip" "$ownerId"
+		$H $INSTANCE "$entityId" "$name" "$platformId" "$ip" "$ownerId" "$crossId"
 	done
 }
 
 handleDisconnect() {
-	local playerId="$1"
-	local entityId="$2"
+	local entityId="$1"
 
 	logPlayerDisconnect $INSTANCE "$entityId"
 
 	for H in $(getHooksFor playerDisconnect $INSTANCE); do
-		$H $INSTANCE "$playerId" "$entityId" "$NICKNAME" "$STEAMID"
+		$H $INSTANCE "$entityId" "$NICKNAME" "$PLATFORMID" "$IP" "$OWNERID" "$CROSSID"
 	done
 }
@@ -61,12 +61,13 @@
 handlePlayerSpawnedInWorld() {
 	local entityId="$1"
-	local playerId="$2"
-	local ownerId="$3"
-	local playerName="$4"
-	local reason="$5"
-	local position="$6"
+	local platformId="$2"
+	local crossId="$3"
+	local ownerId="$4"
+	local playerName="$5"
+	local reason="$6"
+	local position="$7"
 	
 	for H in $(getHooksFor playerSpawned $INSTANCE); do
-		$H $INSTANCE "$entityId" "$playerId" "$ownerId" "$playerName" "$reason" "$position"
+		$H $INSTANCE "$entityId" "$platformId" "$ownerId" "$playerName" "$reason" "$position" "$crossId"
 	done
 }
@@ -135,31 +136,32 @@
 while read line ; do
 	if [ -n "$line" ]; then
-		#Player connected, entityid=1278, name=termo2, steamid=76561197997439820, steamOwner=76561197997439820, ip=178.203.27.140 
+		#Player connected, entityid=1278, name=termo2, pltfmid=Steam_76561197997439820, crossid=EOS_eab...421, steamOwner=Steam_76561197997439820, ip=178.203.27.140 
 		#Player connected, entityid=[0-9]*, name=.*, steamid=[0-9]*, steamOwner=[0-9]*, ip=[a-fA-F:0-9.]*$ 
 		if [ -n "$(echo "$line" | grep '^Player connected,')" ]; then
-			entityId=$(expr "$line" : 'Player connected, entityid=\([0-9]*\), name=.*, steamid=[0-9]*, steamOwner=[0-9]*, ip=[a-fA-F:0-9.]*$')
-			playerName=$(expr "$line" : 'Player connected, entityid=[0-9]*, name=\(.*\), steamid=[0-9]*, steamOwner=[0-9]*, ip=[a-fA-F:0-9.]*$')
-			steamId=$(expr "$line" : 'Player connected, entityid=[0-9]*, name=.*, steamid=\([0-9]*\), steamOwner=[0-9]*, ip=[a-fA-F:0-9.]*$')
-			steamOwner=$(expr "$line" : 'Player connected, entityid=[0-9]*, name=.*, steamid=[0-9]*, steamOwner=\([0-9]*\), ip=[a-fA-F:0-9.]*$')
-			ip=$(expr "$line" : 'Player connected, entityid=[0-9]*, name=.*, steamid=[0-9]*, steamOwner=[0-9]*, ip=\([a-fA-F:0-9.]*\)$')
+			entityId=$(expr "$line" : 'Player connected, entityid=\([0-9]*\), name=.*, pltfmid=.*, crossid=.*, steamOwner=.*, ip=[a-fA-F:0-9.]*$')
+			playerName=$(expr "$line" : 'Player connected, entityid=[0-9]*, name=\(.*\), pltfmid=.*, crossid=.*, steamOwner=.*, ip=[a-fA-F:0-9.]*$')
+			platformId=$(expr "$line" : 'Player connected, entityid=[0-9]*, name=.*, pltfmid=\(.*\), crossid=.*, steamOwner=.*, ip=[a-fA-F:0-9.]*$')
+			crossId=$(expr "$line" : 'Player connected, entityid=[0-9]*, name=.*, pltfmid=.*, crossid=\(.*\), steamOwner=.*, ip=[a-fA-F:0-9.]*$')
+			steamOwner=$(expr "$line" : 'Player connected, entityid=[0-9]*, name=.*, pltfmid=.*, crossid=.*, steamOwner=\(.*\), ip=[a-fA-F:0-9.]*$')
+			ip=$(expr "$line" : 'Player connected, entityid=[0-9]*, name=.*, pltfmid=.*, crossid=.*, steamOwner=.*, ip=\([a-fA-F:0-9.]*\)$')
 			sleep 1
-			handleConnect "$entityId" "$playerName" "$steamId" "$ip" "$steamOwner"
-			unset entityId playerName steamId steamOwner ip
+			handleConnect "$entityId" "$playerName" "$platformId" "$crossId" "$ip" "$steamOwner"
+			unset entityId playerName platformId crossId steamOwner ip
 		#Player disconnected: EntityID=[0-9]*, PlayerID='[0-9]*', OwnerID='[0-9]*', PlayerName='.*'$ 
 		elif [ -n "$(echo "$line" | grep '^Player disconnected: ')" ]; then 
-			playerId=$(expr "$line" : "Player disconnected: EntityID=[0-9]*, PlayerID='\([0-9]*\)', OwnerID='[0-9]*', PlayerName='.*'$") 
-			entityId=$(expr "$line" : "Player disconnected: EntityID=\([0-9]*\), PlayerID='[0-9]*', OwnerID='[0-9]*', PlayerName='.*'$") 
-			handleDisconnect "$playerId" "$entityId"
-			unset playerId entityId
-		#PlayerSpawnedInWorld (reason: .+, position: [0-9]+, [0-9]+, [0-9]+): EntityID=[0-9]+, PlayerID='[0-9]+', OwnerID='[0-9]+', PlayerName='.*'
+			entityId=$(expr "$line" : "Player disconnected: EntityID=\(.*\), PltfmId='.*$") 
+			handleDisconnect "$entityId"
+			unset entityId
+		#PlayerSpawnedInWorld (reason: .*, position: .*, .*, .*): EntityID=.*, PltfmId='.*', CrossId='.*', OwnerID='.*', PlayerName='.*', ClientNumber='.*'
 		elif [ -n "$(echo "$line" | grep '^PlayerSpawnedInWorld ')" ]; then
-			reason=$(expr "$line" : "PlayerSpawnedInWorld (reason: \(.+\), position: [0-9]+, [0-9]+, [0-9]+): EntityID=[0-9]+, PlayerID='[0-9]+', OwnerID='[0-9]+', PlayerName='.*'$") 
-			position=$(expr "$line" : "PlayerSpawnedInWorld (reason: .+, position: \([0-9]+, [0-9]+, [0-9]+\)): EntityID=[0-9]+, PlayerID='[0-9]+', OwnerID='[0-9]+', PlayerName='.*'$") 
-			entityId=$(expr "$line" : "PlayerSpawnedInWorld (reason: .+, position: [0-9]+, [0-9]+, [0-9]+): EntityID=\([0-9]+\), PlayerID='[0-9]+', OwnerID='[0-9]+', PlayerName='.*'$") 
-			playerId=$(expr "$line" : "PlayerSpawnedInWorld (reason: .+, position: [0-9]+, [0-9]+, [0-9]+): EntityID=[0-9]+, PlayerID='\([0-9]+\)', OwnerID='[0-9]+', PlayerName='.*'$") 
-			ownerId=$(expr "$line" : "PlayerSpawnedInWorld (reason: .+, position: [0-9]+, [0-9]+, [0-9]+): EntityID=[0-9]+, PlayerID='[0-9]+', OwnerID='\([0-9]+\)', PlayerName='.*'$") 
-			playerName=$(expr "$line" : "PlayerSpawnedInWorld (reason: .+, position: [0-9]+, [0-9]+, [0-9]+): EntityID=[0-9]+, PlayerID='[0-9]+', OwnerID='[0-9]+', PlayerName='\(.*\)'$") 
-			handlePlayerSpawnedInWorld "$entityId" "$playerId" "$ownerId" "$playerName" "$reason" "$position"
-			unset reason position entityId playerId ownerId playerName
+			reason=$(expr "$line" : "PlayerSpawnedInWorld (reason: \(.*\), position: .*, .*, .*): EntityID=.*, PltfmId='.*', CrossId='.*', OwnerID='.*', PlayerName='.*', ClientNumber='.*'$") 
+			position=$(expr "$line" : "PlayerSpawnedInWorld (reason: .*, position: \(.*, .*, .*\)): EntityID=.*, PltfmId='.*', CrossId='.*', OwnerID='.*', PlayerName='.*', ClientNumber='.*'$") 
+			entityId=$(expr "$line" : "PlayerSpawnedInWorld (reason: .*, position: .*, .*, .*): EntityID=\(.*\), PltfmId='.*', CrossId='.*', OwnerID='.*', PlayerName='.*', ClientNumber='.*'$") 
+			platformId=$(expr "$line" : "PlayerSpawnedInWorld (reason: .*, position: .*, .*, .*): EntityID=.*, PltfmId='\(.*\)', CrossId='.*', OwnerID='.*', PlayerName='.*', ClientNumber='.*'$") 
+			crossId=$(expr "$line" : "PlayerSpawnedInWorld (reason: .*, position: .*, .*, .*): EntityID=.*, PltfmId='.*', CrossId='\(.*\)', OwnerID='.*', PlayerName='.*', ClientNumber='.*'$") 
+			ownerId=$(expr "$line" : "PlayerSpawnedInWorld (reason: .*, position: .*, .*, .*): EntityID=.*, PltfmId='.*', CrossId='.*', OwnerID='\(.*\)', PlayerName='.*', ClientNumber='.*'$") 
+			playerName=$(expr "$line" : "PlayerSpawnedInWorld (reason: .*, position: .*, .*, .*): EntityID=.*, PltfmId='.*', CrossId='.*', OwnerID='.*', PlayerName='\(.*\)', ClientNumber='.*'$") 
+			handlePlayerSpawnedInWorld "$entityId" "$platformId" "$crossId" "$ownerId" "$playerName" "$reason" "$position"
+			unset reason position entityId platformId crossId ownerId playerName
 		#GMSG: .*$
 		elif [ -n "$(echo "$line" | grep -E '^GMSG: .+')" ]; then
@@ -169,9 +171,9 @@
 		#Chat (from '<steamid>', entity id '<entityid>', to '<targettype>'): '<senderchatname>': <msg>
 		elif [ -n "$(echo "$line" | grep -E '^Chat .+')" ]; then
-			steamId=$(expr "$line" : "Chat (from '\(.+\)', entity id '[0-9]+', to '[a-fA-F:0-9.]+'): '.*': .*$") 
-			entityId=$(expr "$line" : "Chat (from '.+', entity id '\([0-9]+\)', to '[a-fA-F:0-9.]+'): '.*': .*$") 
-			targetType=$(expr "$line" : "Chat (from '.+', entity id '[0-9]+', to '\([a-fA-F:0-9.]+\)'): '.*': .*$") 
-			name=$(expr "$line" : "Chat (from '.+', entity id '[0-9]+', to '[a-fA-F:0-9.]+'): '\(.*\)': .*$") 
-			msg=$(expr "$line" : "Chat (from '.+', entity id '[0-9]+', to '[a-fA-F:0-9.]+'): '.*': \(.*\)$") 
+			steamId=$(expr "$line" : "Chat (from '\(.*\)', entity id '.*', to '.*'): '.*': .*$") 
+			entityId=$(expr "$line" : "Chat (from '.*', entity id '\(.*\)', to '.*'): '.*': .*$") 
+			targetType=$(expr "$line" : "Chat (from '.*', entity id '.*', to '\(.*\)'): '.*': .*$") 
+			name=$(expr "$line" : "Chat (from '.*', entity id '.*', to '.*'): '\(.*\)': .*$") 
+			msg=$(expr "$line" : "Chat (from '.*', entity id '.*', to '.*'): '.*': \(.*\)$") 
 			handleChat "$name" "$msg" "$steamId" "$entityId" "$targetType"
 			unset name msg steamId entityId targetType
Index: scripts/usr/local/lib/7dtd/playerlog.sh
===================================================================
--- scripts/usr/local/lib/7dtd/playerlog.sh	(revision 481)
+++ scripts/usr/local/lib/7dtd/playerlog.sh	(revision 482)
@@ -54,18 +54,20 @@
 	local ENTITYID="$2"
 	local NICKNAME="$3"
-	local STEAMID="$4"
-	local IP="$5"
-	local OWNERID="$6"
+	local PLATFORMID="$4"
+	local CROSSID="$5"
+	local IP="$6"
+	local OWNERID="$7"
 
-	echo "$(timestamp) +++ $ENTITYID $NICKNAME $STEAMID $IP $OWNERID" >> "$PLAYERSLOG"
+	echo "$(timestamp) +++ $ENTITYID $NICKNAME $PLATFORMID $CROSSID $IP $OWNERID" >> "$PLAYERSLOG"
 
 	createPlayerList
 	
-	XPATHBASE="/Players/Player[@steamid='$STEAMID']"
+	XPATHBASE="/Players/Player[@platformid='$PLATFORMID']"
 
-	if [ -z $($XMLSTARLET sel -t -v "$XPATHBASE/@steamid" "$PLAYERSXML") ]; then
+	if [ -z $($XMLSTARLET sel -t -v "$XPATHBASE/@platformid" "$PLAYERSXML") ]; then
 		$XMLSTARLET ed -L \
 			-s "/Players" -t elem -n "Player" -v "" \
-			-i "/Players/Player[not(@steamid)]" -t attr -n "steamid" -v "$STEAMID" \
+			-i "/Players/Player[not(@platformid)]" -t attr -n "platformid" -v "$PLATFORMID" \
+			-i "$XPATHBASE" -t attr -n "crossid" -v "$CROSSID" \
 			-i "$XPATHBASE" -t attr -n "nick" -v "$NICKNAME" \
 			-i "$XPATHBASE" -t attr -n "playtime" -v "0" \
@@ -104,7 +106,10 @@
 
 	if [ -f $PLAYERSXML ]; then
-		if [ ! -z $($XMLSTARLET sel -t -v "$XPATHBASE/@steamid" "$PLAYERSXML") ]; then
+		if [ ! -z $($XMLSTARLET sel -t -v "$XPATHBASE/@platformid" "$PLAYERSXML") ]; then
 			NICKNAME=$($XMLSTARLET sel -t -v "$XPATHBASE/@nick" "$PLAYERSXML")
-			STEAMID=$($XMLSTARLET sel -t -v "$XPATHBASE/@steamid" "$PLAYERSXML")
+			PLATFORMID=$($XMLSTARLET sel -t -v "$XPATHBASE/@platformid" "$PLAYERSXML")
+			CROSSID=$($XMLSTARLET sel -t -v "$XPATHBASE/@crossid" "$PLAYERSXML")
+			IP=$($XMLSTARLET sel -t -v "$XPATHBASE/@lastIp" "$PLAYERSXML")
+			OWNERID=$($XMLSTARLET sel -t -v "$XPATHBASE/@steamOwner" "$PLAYERSXML")
 			LOGINTIME=$($XMLSTARLET sel -t -v "$XPATHBASE/@lastlogin" "$PLAYERSXML")
 			PLAYTIME=$($XMLSTARLET sel -t -v "$XPATHBASE/@playtime" "$PLAYERSXML")
@@ -118,5 +123,5 @@
 	fi
 
-	echo "$(timestamp) --- $ENTITYID $NICKNAME $STEAMID" >> "$PLAYERSLOG"
+	echo "$(timestamp) --- $ENTITYID $NICKNAME $PLATFORMID $CROSSID" >> "$PLAYERSLOG"
 }
 
