From cd7e6108796f18bc8af27300b71c306a491e0d4c Mon Sep 17 00:00:00 2001 From: aleos89 Date: Thu, 18 Aug 2016 20:18:19 -0400 Subject: [PATCH] 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. --- src/login/loginlog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/login/loginlog.c b/src/login/loginlog.c index c17c67d237..219bf0f242 100644 --- a/src/login/loginlog.c +++ b/src/login/loginlog.c @@ -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);