ipban now logs when ip is banned
This commit is contained in:
parent
42bac78bf0
commit
4312aeca8f
1 changed files with 1 additions and 0 deletions
|
@ -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'");
|
||||||
}
|
}
|
||||||
// }}}
|
// }}}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue