mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
Announcer support for responding to stopped events (#918)
* Announcer support for answering stopped events
This commit is contained in:
parent
9a372605f3
commit
6a007023da
2 changed files with 6 additions and 8 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue