summaryrefslogtreecommitdiff
path: root/src/char/geoip.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-09 00:16:58 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-15 11:47:30 +0300
commit50cb8eeff4386e5546da35c40de93c891af47d0d (patch)
tree49f32efa5b5be350112f5ef1413f4db41d7d9d06 /src/char/geoip.h
parente4f78d0a13233181cec890b24c77748e32b2fd03 (diff)
downloadhercules-50cb8eeff4386e5546da35c40de93c891af47d0d.tar.gz
hercules-50cb8eeff4386e5546da35c40de93c891af47d0d.tar.bz2
hercules-50cb8eeff4386e5546da35c40de93c891af47d0d.tar.xz
hercules-50cb8eeff4386e5546da35c40de93c891af47d0d.zip
Create geoip interface.
Diffstat (limited to 'src/char/geoip.h')
-rw-r--r--src/char/geoip.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/char/geoip.h b/src/char/geoip.h
new file mode 100644
index 000000000..4579554a1
--- /dev/null
+++ b/src/char/geoip.h
@@ -0,0 +1,30 @@
+// 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/cbasetypes.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);
+} geoip_s;
+
+struct geoip_interface *geoip;
+
+void geoip_defaults(void);
+
+#endif /* CHAR_GEOIP_H */