diff options
author | Paradox924X <Paradox924X@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-11-22 10:19:44 +0000 |
---|---|---|
committer | Paradox924X <Paradox924X@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-11-22 10:19:44 +0000 |
commit | 4283f7b042db854c4371107918bb64f94498953e (patch) | |
tree | da064ff323d753455596dddb14587893882fbe03 /src/login/login.c | |
parent | da17b9b18b29c9dda20ddcd52cc9d6f1c79ae72f (diff) | |
download | hercules-4283f7b042db854c4371107918bb64f94498953e.tar.gz hercules-4283f7b042db854c4371107918bb64f94498953e.tar.bz2 hercules-4283f7b042db854c4371107918bb64f94498953e.tar.xz hercules-4283f7b042db854c4371107918bb64f94498953e.zip |
Added 'ipban_cleanup_interval' option which determines how often expired IP bans are cleaned from the database. (bugreport:3734)
Modified ipban_check() to only include ipbans that haven't already expired. (bugreport:3734)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14161 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/login/login.c')
-rw-r--r-- | src/login/login.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/login/login.c b/src/login/login.c index d31408fac..7cb00c888 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -1474,6 +1474,7 @@ void login_set_defaults() { login_config.login_ip = INADDR_ANY; login_config.login_port = 6900; + login_config.ipban_cleanup_interval = 60; login_config.ip_sync_interval = 0; login_config.log_login = true; safestrncpy(login_config.date_format, "%Y-%m-%d %H:%M:%S", sizeof(login_config.date_format)); @@ -1559,6 +1560,8 @@ int login_config_read(const char* cfgName) login_config.use_dnsbl = (bool)config_switch(w2); else if(!strcmpi(w1, "dnsbl_servers")) safestrncpy(login_config.dnsbl_servs, w2, sizeof(login_config.dnsbl_servs)); + else if(!strcmpi(w1, "ipban_cleanup_interval")) + login_config.ipban_cleanup_interval = (unsigned int)atoi(w2); else if(!strcmpi(w1, "ip_sync_interval")) login_config.ip_sync_interval = (unsigned int)1000*60*atoi(w2); //w2 comes in minutes. |