ipban now logs when ip is banned

This commit is contained in:
Daku 2012-01-27 06:25:33 +00:00
parent 42bac78bf0
commit 4312aeca8f

View file

@ -262,6 +262,7 @@ class IPBan extends SimpleExtension {
$sql = "INSERT INTO bans (ip, reason, end_timestamp, banner_id) VALUES (:ip, :reason, :end, :admin_id)"; $sql = "INSERT INTO bans (ip, reason, end_timestamp, banner_id) VALUES (:ip, :reason, :end, :admin_id)";
$database->Execute($sql, array("ip"=>$ip, "reason"=>$reason, "end"=>strtotime($end), "admin_id"=>$user->id)); $database->Execute($sql, array("ip"=>$ip, "reason"=>$reason, "end"=>strtotime($end), "admin_id"=>$user->id));
$database->cache->delete("ip_bans"); $database->cache->delete("ip_bans");
log_info("ipban", "'$user->name' has banned '$ip' because '$reason' until '$end'");
} }
// }}} // }}}
} }