summaryrefslogtreecommitdiff
path: root/src/login/ipban_txt.c
blob: 6fee15c282fdd11c6f5b0ba77b4d742d963241ba (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder

#include "../common/cbasetypes.h"
#include "../common/strlib.h"
#include "login.h"
#include "ipban.h"
#include <stdlib.h>
#include <string.h>

void ipban_init(void)
{
}

void ipban_final(void)
{
}

bool ipban_check(uint32 ip)
{
	return false;
}

void ipban_log(uint32 ip)
{
}

bool ipban_config_read(const char* key, const char* value)
{
	// login server settings
	if( strcmpi(key, "ipban.enable") == 0 )
		login_config.ipban = (bool)config_switch(value);
	else
	if( strcmpi(key, "ipban.dynamic_pass_failure_ban") == 0 )
		login_config.dynamic_pass_failure_ban = (bool)config_switch(value);
	else
	if( strcmpi(key, "ipban.dynamic_pass_failure_ban_interval") == 0 )
		login_config.dynamic_pass_failure_ban_interval = atoi(value);
	else
	if( strcmpi(key, "ipban.dynamic_pass_failure_ban_limit") == 0 )
		login_config.dynamic_pass_failure_ban_limit = atoi(value);
	else
	if( strcmpi(key, "ipban.dynamic_pass_failure_ban_duration") == 0 )
		login_config.dynamic_pass_failure_ban_duration = atoi(value);
	else
		return false;

	return true;
}