ソースを参照

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.

aleos89 8 年 前
コミット
cd7e610879
1 ファイル変更1 行追加1 行削除
  1. 1 1
      src/login/loginlog.c

+ 1 - 1
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);