Improve filter
This commit is contained in:
parent
b0df386517
commit
045ae89764
|
@ -500,30 +500,25 @@ $config['filters'][] = array(
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Filters for diverting TheThingN0ticer ban evader
|
* Filter TheThingN0ticer ban evader
|
||||||
*/
|
*/
|
||||||
$fakereason_thing = 'Due to automated child pornography and gore spam by /pol/, all posting now requires a pass.<br>To receive a one-week pass, email a short explanation of the Labor Theory of Value to space@national.shitposting.agency .';
|
event_handler('post', function($post, $tor) {
|
||||||
event_handler('post', function($post) {
|
if($post->board == 'leftypol'){
|
||||||
$fakereason_thing = 'Due to automated child pornography and gore spam by /pol/, all posting now requires a pass.<br>To receive a one-week pass, email a short explanation of the Labor Theory of Value to space@national.shitposting.agency .';
|
// note: just posting nazi flag with name doesn't trigger, on purpose
|
||||||
|
$n = 0;
|
||||||
// Detects posts in the /ITG/ with the filename "Untitled.png" and a Nazi flag
|
// body is just a twitter account
|
||||||
if (!$post->op && $post->board == 'leftypol' && $post->thread == 110463 && $post->has_file &&
|
if(preg_match('/^https:\/\/twitter\.com\/[a-zA-Z0-9_-]+\/?(<tinyboard[^>]*>[^<]*<\/tinyboard>|<[^>]*>|\s)*$/',
|
||||||
$post->files[0]->filename == 'Untitled.png' &&
|
$post->body_nomarkup)){$n+=2;}
|
||||||
strpos($post->body_nomarkup, "Nazi</tinyboard>") !== false) { /* has Nazi flag, hack */
|
if($post->has_file && $post->files[0]->filename == 'Untitled.png'){$n+=2;}
|
||||||
return $fakereason_thing;
|
if($post->name != 'Anonymous'){$n++;}
|
||||||
// Detects posts with the Nazi flag and their favorite Twitter links
|
if(strpos($post->body_nomarkup,'<tinyboard flag>nazi</tinyboard>')){$n++;}
|
||||||
} else if (strpos($post->body_nomarkup, "Nazi</tinyboard>") !== false && /* has Nazi flag, hack */
|
|
||||||
preg_match('/\/(WokeCapital|NickJFuentes|af_clips)/', $post->body)) {
|
if($n > 2){
|
||||||
return $fakereason_thing;
|
if($tor){return 'Your IP address is posting too quickly.';}
|
||||||
|
return 'Your IP address is listed in multirbl.efnetrbl.org.';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$config['filters'][] = array(
|
|
||||||
'condition' => array(
|
|
||||||
'name' => '/Chauvinist/', // Current name as of April.
|
|
||||||
),
|
|
||||||
'action' => 'reject',
|
|
||||||
'message' => $fakereason_thing
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// Changes made via web editor by "zul_admin" @ Fri, 19 Feb 2021 15:06:33 -0800:
|
// Changes made via web editor by "zul_admin" @ Fri, 19 Feb 2021 15:06:33 -0800:
|
||||||
|
|
5
post.php
5
post.php
|
@ -1295,10 +1295,13 @@ function handle_post(){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Custom /leftypol/ var to check if Tor
|
||||||
|
$tor = ($_SERVER['REMOTE_ADDR'] == '127.0.0.1');
|
||||||
|
|
||||||
$post = (object)$post;
|
$post = (object)$post;
|
||||||
$post->files = array_map(function($a) { return (object)$a; }, $post->files);
|
$post->files = array_map(function($a) { return (object)$a; }, $post->files);
|
||||||
|
|
||||||
$error = event('post', $post);
|
$error = event('post', $post, $tor);
|
||||||
$post->files = array_map(function($a) { return (array)$a; }, $post->files);
|
$post->files = array_map(function($a) { return (array)$a; }, $post->files);
|
||||||
|
|
||||||
if ($error) {
|
if ($error) {
|
||||||
|
|
Loading…
Reference in New Issue