Manual:Hooks/BlockIp

Details
This occurs before an IP address or user is blocked, or the block settings are changed.
 * $block: the Block object about to be saved
 * $user: the user doing the block (not the one being blocked)
 * &$reason: if the hook is aborted, the error message in an array, by default:  (since 1.23, 108285)