fallenPineapple / NPFchan

vichan branch taking it to the next level... Maybe
Other
43 stars 17 forks source link

Custom conditions based on ip not working #169

Closed roIyat closed 6 years ago

roIyat commented 7 years ago

I made custom condition to indicate cooldown for threads but it's throwing false positive most of the time. I guess it's because ip is not recognized properly. It worked fine on clean vichan though.

$config['filters'][] = array( 'condition' => array( 'flood-match' => array('ip'), 'flood-time' => 5*60, 'custom' => function($post) { if($post['op'] == true) return true; else return false; } ), 'action' => 'reject', 'message' => 'You must wait 5 minute to create new thread' );