summaryrefslogblamecommitdiff
path: root/src/char/geoip.h
blob: 4579554a1ac8fc9688dfb0bcfdab3d6a83dbe18d (plain) (tree)





























                                                                    
// 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 */