Announcer support for responding to stopped events (#918)

* Announcer support for answering stopped events
This commit is contained in:
Constantine Kovalensky 2023-09-30 13:20:55 +04:00 committed by GitHub
commit 6a007023da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 8 deletions

View file

@ -21,17 +21,15 @@ if ($bb_cfg['tracker']['bt_off']) {
//
// Functions
//
function silent_exit()
function silent_exit($msg = '')
{
ob_end_clean();
echo \SandFox\Bencode\Bencode::encode(['warning message' => str_compact($msg)]);
exit;
}
function error_exit($msg = '')
{
silent_exit();
echo \SandFox\Bencode\Bencode::encode(['failure reason' => str_compact($msg)]);
exit;