Kopion fix

This commit is contained in:
BubbaGumpShrump 2024-12-07 15:06:35 -05:00
parent b99965d245
commit 8d634dd20f

View file

@ -206,13 +206,21 @@ function Read-LogEntry {
$damageType = $matches['DamageType']
$ship = $global:loadOut
Try {
$page1 = Invoke-WebRequest -uri "https://robertsspaceindustries.com/citizens/$enemyPilot"
} Catch {
$page1 = $null
}
If ($null -ne $page1){
If ($enemyShip -eq $global:lastKill){
$enemyShip = "Passenger"
} Else {
$global:lastKill = $enemyShip
}
If (($player -eq $global:userName -and $enemyPilot -ne $global:userName) -and ($enemyPilot -notlike "PU_*" -and $enemyPilot -notlike "NPC_*")){
If ($player -eq $global:userName -and $enemyPilot -ne $global:userName){
If ($enemyShip -match $cleanupPattern){
$enemyShip = $matches[1]
}
@ -246,7 +254,7 @@ function Read-LogEntry {
}
$KillTime = (Get-Date).ToUniversalTime().ToString("d MMM yyyy H:mm 'UTC'")
$page1 = Invoke-WebRequest -uri "https://robertsspaceindustries.com/citizens/$enemyPilot"
# Get Enlisted Date
if ($($page1.content) -match $joinDatePattern) {
@ -387,6 +395,7 @@ function Read-LogEntry {
Start-Sleep $sleeptimer
}
}
}
# Get Logged-in User
If ($line -match $loginPattern) {