mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
Allow selecting which actions to block if the user's IP is listed in spamfilter #2423
This commit is contained in:
parent
a04dc1270f
commit
fe6625bfbb
5 changed files with 91 additions and 13 deletions
|
|
@ -20,7 +20,7 @@ class SpamfilterAdminController extends Spamfilter
|
|||
$config = ModuleModel::getModuleConfig('spamfilter') ?: new stdClass;
|
||||
|
||||
// Get the default information
|
||||
$args = Context::gets('limits', 'limits_interval', 'limits_count', 'ipv4_block_range', 'ipv6_block_range', 'except_ip', 'custom_message');
|
||||
$args = Context::gets('limits', 'limits_interval', 'limits_count', 'blocked_actions', 'ipv4_block_range', 'ipv6_block_range', 'except_ip', 'custom_message');
|
||||
|
||||
// Set default values
|
||||
if($args->limits != 'Y')
|
||||
|
|
@ -38,6 +38,7 @@ class SpamfilterAdminController extends Spamfilter
|
|||
$args->except_ip = array_map('trim', preg_split('/[\n,]/', trim($args->except_ip ?? ''), -1, \PREG_SPLIT_NO_EMPTY));
|
||||
$args->limits_interval = intval($args->limits_interval);
|
||||
$args->limits_count = intval($args->limits_count);
|
||||
$args->blocked_actions = array_values($args->blocked_actions ?? []);
|
||||
$args->custom_message = escape(utf8_trim($args->custom_message));
|
||||
foreach ($args as $key => $val)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue