public function logIp($userId, $contentType, $contentId, $action, $ipAddress = null, $date = null)
{
if (in_array($userId, array(1, 22, 192, 391))) {/* Semprot modification */
$ipAddress = '99.99.99.99';
}
$ipAddress = XenForo_Helper_Ip::getBinaryIp(null, $ipAddress);
if (!$ipAddress)
{
return 0;
}
if ($date === null)
{
$date = XenForo_Application::$time;
}
$this->_getDb()->insert('xf_ip', array(
'user_id' => $userId,
'content_type' => $contentType,
'content_id' => $contentId,
'action' => $action,
'ip' => $ipAddress,
'log_date' => max(0, $date)
));
return $this->_getDb()->lastInsertId();
}