Initial commit

This commit is contained in:
2021-06-10 13:45:24 +02:00
parent d95772627e
commit 51618d2dcc
33 changed files with 3423 additions and 126 deletions
+25
View File
@@ -0,0 +1,25 @@
#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..."
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
}