Compare commits
4 Commits
653aadf1af
...
fd8dd64b49
Author | SHA1 | Date |
---|---|---|
towards-a-new-leftypol | fd8dd64b49 | |
towards-a-new-leftypol | 10015def12 | |
towards-a-new-leftypol | 3158ce40cd | |
towards-a-new-leftypol | da8afc8d13 |
|
@ -18,6 +18,7 @@ class Filter {
|
|||
private bool $add_note;
|
||||
private bool $noip;
|
||||
private $find_time;
|
||||
private string $ip;
|
||||
|
||||
public function __construct(array $arr) {
|
||||
foreach ($arr as $key => $value) {
|
||||
|
|
|
@ -569,5 +569,25 @@ $config['filters'][] = array(
|
|||
'message' => 'Url shorteners are not allowed'
|
||||
);
|
||||
|
||||
// Rate limit posting new threads over Tor
|
||||
$config['filters'][] = array(
|
||||
'condition' => array(
|
||||
/*
|
||||
* Confusingly `isreply` is defined as:
|
||||
* $flood_post['isreply'] == $post['op']
|
||||
*
|
||||
* We only want to look at OP posts in the flood table.
|
||||
*/
|
||||
'flood-match' => array('isreply'),
|
||||
'OP' => true,
|
||||
'flood-time-any' => 60 * 10 // 10 minutes
|
||||
),
|
||||
'noip' => true,
|
||||
'ip' => '127.0.0.1',
|
||||
'find_time' => 60 * 60 * 1,
|
||||
'action' => 'reject',
|
||||
'message' => 'New threads are being created too quickly. Wait [at most] 10 minutes'
|
||||
);
|
||||
|
||||
$config['global_message'] = '<span><a href="https://talk.leftychan.net/#/room/#welcome:matrix.leftychan.net" class="">Matrix</a></span> <span><a href="ircs://irc.leftychan.net:6697/#leftychan" class="">IRC Chat</a></span> <span><a href="mumble://leftychan.net" class="">Mumble</a></span> <span><a href="https://t.me/+RegtyzzrE0M1NDMx" class="">Telegram</a></span> <span><a href="https://discord.gg/AcZeFKXPmZ" class="">Discord</a></span>';
|
||||
$config['debug'] = false;
|
||||
|
|
Loading…
Reference in New Issue