Adjusted the temporary ban check

* Temporarily ban players who attempt to login to too many unregistered accounts.
* This makes it tougher for people who have access to server data and attempt to use that data on other servers.
This commit is contained in:
aleos89
2016-08-18 20:18:19 -04:00
parent 03adcd9bce
commit cd7e610879

View File

@@ -47,7 +47,7 @@ unsigned long loginlog_failedattempts(uint32 ip, unsigned int minutes) {
if( !enabled )
return 0;
if( SQL_ERROR == Sql_Query(sql_handle, "SELECT count(*) FROM `%s` WHERE `ip` = '%s' AND `rcode` = '1' AND `time` > NOW() - INTERVAL %d MINUTE",
if( SQL_ERROR == Sql_Query(sql_handle, "SELECT count(*) FROM `%s` WHERE `ip` = '%s' AND (`rcode` = '0' OR `rcode` = '1') AND `time` > NOW() - INTERVAL %d MINUTE",
log_login_db, ip2str(ip,NULL), minutes) )// how many times failed account? in one ip.
Sql_ShowDebug(sql_handle);