mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
External bencode library and some other changes.
This commit is contained in:
parent
0ed80b7074
commit
bb6f772627
10 changed files with 137 additions and 85 deletions
|
@ -50,11 +50,11 @@ function msg_die($msg)
|
|||
dbg_log(' ', '!die-' . clean_filename($msg));
|
||||
}
|
||||
|
||||
$output = bencode(array(
|
||||
$output = \Rych\Bencode\Bencode::encode([
|
||||
'min interval' => (int)1800,
|
||||
'failure reason' => (string)$msg,
|
||||
'warning message' => (string)$msg,
|
||||
));
|
||||
]);
|
||||
|
||||
die($output);
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ $output['files'][$info_hash] = array(
|
|||
'incomplete' => (int)$row['leechers'],
|
||||
);
|
||||
|
||||
echo bencode($output);
|
||||
echo \Rych\Bencode\Bencode::encode($output);
|
||||
|
||||
tracker_exit();
|
||||
exit;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue