Added logging type 19 - IP Banned for excessive authentication attempts. See PHPCRED-33
Added logging type 19 - IP Banned for excessive authentication attempts. See PHPCRED-33

--- a/lib/db/authdb.class.php
+++ b/lib/db/authdb.class.php
@@ -107,9 +107,12 @@
 $tries =$this->loadResult();
 
     if ($tries->failcount > $threshold){
-     $sql = "INSERT INTO #__bannedIPs (`IP`,`Expiry`) VALUES ('$ip','$bantime') ON DUPLICATE KEY UPDATE `Expiry`='$bantime'";
+      $sql = "INSERT INTO #__bannedIPs (`IP`,`Expiry`) VALUES ('$ip','$bantime') ON DUPLICATE KEY UPDATE `Expiry`='$bantime'";
       $this->setQuery($sql);
-    $this->runQuery();
+      $this->runQuery();
+
+      $log = new Logging;
+      $log->logEntry($ip,19);
 
     }
 
@@ -566,3 +569,4 @@
 }
 
 ?>
+

--- a/lib/db/loggingdb.class.php
+++ b/lib/db/loggingdb.class.php
@@ -34,6 +34,7 @@
 *  16: Credential Type Deleted
 *  17: Credential Type Edited
 *  18: User Group Edited
+*  19: IP Banned (New in v1.25)
 *
 * @return boolean
 */
@@ -78,3 +79,4 @@
 }
 
 ?>
+