Révision 76e2e7c3
Ajouté par Assos Assos il y a environ 10 ans
drupal7/sites/all/modules/rules/modules/system.eval.inc | ||
---|---|---|
150 | 150 |
$message['body'][] = $params['message']; |
151 | 151 |
} |
152 | 152 |
|
153 |
/** |
|
154 |
* Action: Block an IP address. |
|
155 |
*/ |
|
156 |
function rules_action_block_ip($ip_address = NULL) { |
|
157 |
if (empty($ip_address)) { |
|
158 |
$ip_address = ip_address(); |
|
159 |
} |
|
160 |
db_insert('blocked_ips')->fields(array('ip' => $ip_address))->execute(); |
|
161 |
watchdog('rules', 'Banned IP address %ip', array('%ip' => $ip_address)); |
|
162 |
} |
|
163 |
|
|
153 | 164 |
/** |
154 | 165 |
* A class implementing a rules input evaluator processing tokens. |
155 | 166 |
*/ |
Formats disponibles : Unified diff
Weekly update of contrib modules