summaryrefslogtreecommitdiff
path: root/src/char/geoip.h
blob: 5a6abf68a618a6c0ca709ff2624ca5a48dc2cf51 (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
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams

#ifndef CHAR_GEOIP_H
#define CHAR_GEOIP_H

#include "common/hercules.h"

/**
 * GeoIP information
 **/
struct s_geoip {
	unsigned char *cache; // GeoIP.dat information see geoip->init()
	bool active;
};


/**
 * geoip interface
 **/
struct geoip_interface {
	struct s_geoip *data;
	const char* (*getcountry) (uint32 ipnum);
	void (*final) (bool shutdown);
	void (*init) (void);
};

#ifdef HERCULES_CORE
void geoip_defaults(void);
#endif // HERCULES_CORE

HPShared struct geoip_interface *geoip;

#endif /* CHAR_GEOIP_H */