This repository has been archived on 2026-05-07. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files

26 lines
656 B
PowerShell

#Requires -Version 7.0
$Host.UI.RawUI.WindowTitle = "osu! Unalike IRC worker"
$file = "requests.json"
Write-Host "[Unalike] Service loop started."
while($true)
{
$content = Get-Content $file
$decision = $content -eq "{}"
if ($decision)
{
}
else
{
Write-Host "[Unalike] Starting IRC bot..."
Write-Host "Request: $content"
Set-Content -Path $file -Value "{}"
$flags = "unalike.py"
$flagArray = $flags -split " "
Start-Process -FilePath python -ArgumentList $flagArray -NoNewWindow -Wait
Set-Content -Path $file -Value "{}"
Write-Host "[Unalike] The bot is offline. Initialize it using the request file."
}
Start-Sleep -Seconds 2
}