Fixed files not fclose()ing

Module no longer reloads on mapchange
This commit is contained in:
David Anderson 2004-09-17 01:19:03 +00:00
parent e0af113cac
commit ab2794d4bd
2 changed files with 9 additions and 3 deletions

View File

@ -39,6 +39,12 @@ void OnAmxxAttach()
MF_AddNatives(geoip_natives); MF_AddNatives(geoip_natives);
} }
void OnAmxxDetach()
{
GeoIP_delete(gi);
gi = NULL;
}
AMX_NATIVE_INFO geoip_natives[] = { AMX_NATIVE_INFO geoip_natives[] = {
{"geoip_code2", amx_geoip_code2}, {"geoip_code2", amx_geoip_code2},
{"geoip_code3", amx_geoip_code3}, {"geoip_code3", amx_geoip_code3},

View File

@ -10,7 +10,7 @@
#define MODULE_URL "http://www.bailopan.com/" #define MODULE_URL "http://www.bailopan.com/"
#define MODULE_LOGTAG "GEOIP" #define MODULE_LOGTAG "GEOIP"
// If you want the module not to be reloaded on mapchange, remove / comment out the next line // If you want the module not to be reloaded on mapchange, remove / comment out the next line
#define MODULE_RELOAD_ON_MAPCHANGE //#define MODULE_RELOAD_ON_MAPCHANGE
#ifdef __DATE__ #ifdef __DATE__
#define MODULE_DATE __DATE__ #define MODULE_DATE __DATE__
@ -29,7 +29,7 @@
// Do native functions init here (MF_AddNatives) // Do native functions init here (MF_AddNatives)
#define FN_AMXX_ATTACH OnAmxxAttach #define FN_AMXX_ATTACH OnAmxxAttach
// AMXX dettach // AMXX dettach
//#define FN_AMXX_DETTACH OnAmxxDettach #define FN_AMXX_DETTACH OnAmxxDettach
// All plugins loaded // All plugins loaded
// Do forward functions init here (MF_RegisterForward) // Do forward functions init here (MF_RegisterForward)
// #define FN_AMXX_PLUGINSLOADED OnPluginsLoaded // #define FN_AMXX_PLUGINSLOADED OnPluginsLoaded