Please use BukkitDev for bug reports http://dev.bukkit.org/server-mods/geoiptools/ GeoIPTools - API for lookups in the Maxmind GeoIP database Version: v0.2 Keeping the GeoIP database loaded costs a lot of ressources when multiple plugins load multiple instances of that database it is just a waste of ressources. Therefore this plugin was created to channel all GeoIP calls to only one loaded instance of that database. Features: Supports the GeoIPCountry, GeoIPCity and GeoIPv6 databases Databases are downloaded automatically and auto updated Auto update can be disabled Databases are only loaded when a plugin requests it The user can specify from where the databases will be downloaded The user can specify a path to his own database files(download and auto update feature will be disabled in this case) Supports PermissionsBukkit Download: http://stuff.whoami.org.uk/geoiptools/0.2/GeoIPTools.jar Source: https://github.com/whoami-plugins/GeoIPTools Permissions: Code: geoiptools.geoupdate Without PermissionsBukkit it defaults to OP. Usage: Normal Users (Move your mouse to reveal the content) Normal Users (open) Normal Users (close) Copy the GeoIPTools.jar into your plugins folder. If you want to specify custom paths to the database files add this to plugins/GeoIPTools/config.yml Code: Path: IPv6Database: "/path/to/file" cityDatabase: "/path/to/file" countryDatabase: "/path/to/file" To disable the auto updates add Code: Update:disabled: true to the file. To run a update by hand use this command: Code: /geoupdate Developers (Move your mouse to reveal the content) Developers (open) Developers (close) Add the GeoIPTools.jar as a library to your plugin project. To get an instance of GeoIPLookup add the following method to your plugin: Code: private GeoIPLookup getGeoIPLookup(int bitmask) { Plugin pl = this.getServer().getPluginManager().getPlugin("GeoIPTools"); if(pl != null) { return ((GeoIPTools) pl).getGeoIPLookup(bitmask); } else { return null; } } and call it where ever you need it. Look here to see how exactly the bitmask of getGeoIPLookup() works. When an error occurs while loading the database the method will return null and the error will be logged to console. GeoIPLookup has 4 public methods: Code: //lookups for country public Country getCountry(InetAddress inet) //only useful when you loaded the city database public Location getLocation(InetAddress inet) //You can also access the LookupServices directly //Do not close them they are shared with all other plugins public LookupService getLookupService() public LookupService getLookupServiccev6() Changelog: Version 0.2 added config option to disable auto update added option to start update with command(/geoupdate) added support for PermissionsBukkit Version 0.1 Release
This is a very nice plugin and i am using it with CountryLoginMessage plugin. But can you add a cmd for auto update GeoIPTools, like update every month or week. It takes very long to /reloadrestart a server when its trying to update GeoIPTools, its like a 30mb update every time __________________________ 2011-07-30 09:00:26 [INFO] [GeoIPTools] Starting database updates 2011-07-30 09:00:37 [INFO] [GeoIPTools] Read timed out 2011-07-30 09:00:37 [INFO] [GeoIPTools] ./plugins/GeoIPTools/GeoLiteCity.dat updated 2011-07-30 09:00:48 [INFO] [GeoIPTools] Read timed out 2011-07-30 09:00:48 [INFO] [GeoIPTools] ./plugins/GeoIPTools/GeoIP.dat updated 2011-07-30 09:00:58 [INFO] [GeoIPTools] Read timed out 2011-07-30 09:00:58 [INFO] [GeoIPTools] ./plugins/GeoIPTools/GeoIPv6.dat updated 2011-07-30 09:00:58 [INFO] [GeoIPTools] GeoIPTools 0.1 loaded
Hmm this should not be there. It means that there was an error during the download. Usually the plugin only downloads a database when there is a new version available.
It downloads almost every time i do reload. The timed out error was only one time I would be happy with a cmd to disable autoupdate 09:36:16 [INFO] [GeoIPTools] Starting database updates 09:36:49 [INFO] [GeoIPTools] ./plugins/GeoIPTools/GeoLiteCity.dat updated 09:36:51 [INFO] [GeoIPTools] ./plugins/GeoIPTools/GeoIP.dat updated 09:36:53 [INFO] [GeoIPTools] ./plugins/GeoIPTools/GeoIPv6.dat updated 09:36:53 [INFO] [GeoIPTools] GeoIPTools 0.1 loaded i takes like 40 sec almost every reload.
i will add a configuration option to disable auto update and add a command to start the update process by hand
Gives me this on first plugin run. Code: 2011-08-01 22:00:32 [INFO] [GeoIPTools] Starting database updates 2011-08-01 22:00:43 [INFO] [GeoIPTools] connect timed out 2011-08-01 22:00:43 [INFO] [GeoIPTools] ./plugins/GeoIPTools/GeoLiteCity.dat updated 2011-08-01 22:00:53 [INFO] [GeoIPTools] connect timed out 2011-08-01 22:00:53 [INFO] [GeoIPTools] ./plugins/GeoIPTools/GeoIP.dat updated 2011-08-01 22:01:06 [INFO] [GeoIPTools] Read timed out 2011-08-01 22:01:06 [INFO] [GeoIPTools] ./plugins/GeoIPTools/GeoIPv6.dat updated 2011-08-01 22:01:06 [INFO] [GeoIPTools] GeoIPTools 0.1 loaded In the future could you bundle the database with the plugin .jar in a zip file so this doesn't happen?
The databases are 30MB big. So I rather not bundle them. But you can download them by hand and extract them into the plugins/GeoIPTools folder.
I had to do that through a proxy, as for some reason my internet connection can't access maxmind.com, nor can the internet at my server hosting company. Also, how often should I update the databases?
This plugin is intended for developers of plugins that use the maxmind geoip databases. To get actual informations you need a 2nd plugin which uses GeoIPTools
18:49:38 [INFO] CountryLoginMessage version 1.3 is enabled! 18:49:38 [INFO] [P2Aliases] version 1.4 Enabled. 18:49:38 [INFO] [Citizens] No NPC types loaded. 18:49:39 [INFO] [Citizens] Permissions system found (PermissionsEx v1.16) 18:49:39 [INFO] [Citizens] version [1.1] loaded. 18:49:39 [INFO] [Citizens] Economy plugin found (iConomy v5) 18:49:39 [INFO] [Jobs] - max-jobs property not found. Defaulting to unlimited! 18:49:39 [INFO] [Jobs] - Job Woodcutter is missing the max-level property. defaulting to no limits ! 18:49:39 [INFO] [Jobs] - Job Woodcutter is missing the slots property. defaulting to no limits ! 18:49:39 [INFO] [Jobs] - Job Miner is missing the max-level property. defaulting to no limits ! 18:49:39 [INFO] [Jobs] - Job Miner is missing the slots property. defaulting to no limits ! 18:49:39 [INFO] [Jobs] - Job Builder is missing the max-level property. defaulting to no limits ! 18:49:39 [INFO] [Jobs] - Job Builder is missing the slots property. defaulting to no limits ! 18:49:39 [INFO] [Jobs] - Job Digger is missing the max-level property. defaulting to no limits ! 18:49:39 [INFO] [Jobs] - Job Digger is missing the slots property. defaulting to no limits ! 18:49:39 [INFO] [Jobs] - Job Farmer is missing the max-level property. defaulting to no limits ! 18:49:39 [INFO] [Jobs] - Job Farmer is missing the slots property. defaulting to no limits ! 18:49:39 [INFO] [Jobs] - Job Hunter is missing the max-level property. defaulting to no limits ! 18:49:39 [INFO] [Jobs] - Job Hunter is missing the slots property. defaulting to no limits ! 18:49:39 [INFO] [Jobs] - Job Fisherman is missing the max-level property. defaulting to no limits ! 18:49:39 [INFO] [Jobs] - Job Fisherman is missing the slots property. defaulting to no limits ! 18:49:39 [INFO] [Jobs] - Job None is missing the max-level property. defaulting to no limits ! 18:49:39 [INFO] [Jobs] - Job None is missing the slots property. defaulting to no limits ! 18:49:39 [INFO] [Jobs v2.5.6] has been enabled succesfully. 18:49:39 [INFO] [Jobs] Successfully linked with iConomy 5. 18:49:39 [INFO] [Jobs] Successfully linked with Permissions. 18:49:39 [INFO] [MultiWorld] Enabling MultiWorld 18:49:39 [INFO] [MultiWorld] Defaulting to default permissions 18:49:39 [INFO] Preparing start region for level 3 (Seed: 0) 18:49:39 [INFO] [Stargate] Sign on line 1 doesn't exist. BlockType = STONE 18:49:39 [INFO] [Stargate] {3} Loaded 0 stargates with 0 set as always-on 18:49:39 [INFO] Preparing start region for level 4 (Seed: 1435672245) 18:49:39 [INFO] [Stargate] {2} Loaded 1 stargates with 0 set as always-on 18:49:39 [INFO] Preparing start region for level 5 (Seed: -7574215068224088552) 18:49:40 [INFO] [Stargate] {1} Loaded 1 stargates with 0 set as always-on 18:49:40 [INFO] Preparing start region for level 6 (Seed: 0) 18:49:40 [INFO] [Stargate] {6} Loaded 1 stargates with 2 set as always-on 18:49:40 [INFO] Preparing start region for level 7 (Seed: 0) 18:49:40 [INFO] [Stargate] Sign on line 1 doesn't exist. BlockType = AIR 18:49:40 [INFO] [Stargate] {5} Loaded 0 stargates with 2 set as always-on 18:49:40 [INFO] Preparing start region for level 8 (Seed: 4344731889099962764) 18:49:41 [INFO] [Stargate] {4} Loaded 1 stargates with 4 set as always-on 18:49:41 [INFO] [MultiWorld] load complete 18:49:41 [INFO] [MultiWorld] v1.9.0 enabled. 18:49:41 [INFO] Version: 120 18:49:41 [INFO] [NarrowtuxLib] v1.2.0 by [narrowtux] enabled. 18:49:41 [INFO] [NarrowtuxLib] Payment method found (iConomy version: 5) 18:49:41 [INFO] [Showcase] Registered type [basic] (0 items loaded) 18:49:41 [INFO] [Showcase] Registered type [finite] (4 items loaded) 18:49:41 [INFO] [Showcase] Registered type [infinite] (109 items loaded) 18:49:41 [INFO] [Showcase] Registered type [exchange] (0 items loaded) 18:49:41 [INFO] [Showcase] Registered type [tutorial] (0 items loaded) 18:49:41 [INFO] [Showcase] version 0.7.9 has been enabled. 18:49:41 [INFO] Server permissions file permissions.yml is empty, ignoring it 18:49:41 [INFO] Done (0.625s)! For help, type "help" or "?" 18:49:41 [INFO] [Citizens] Loaded 0 NPCs. 18:49:41 [INFO] [BBROTHER] Building `ownership` table... 18:49:43 [INFO] [BBROTHER] Removed 0 old records because of age in 0h00m00s. 18:49:58 [WARNING] Can't keep up! Did the system time change, or is the server overloaded? 18:50:02 [WARNING] Can't keep up! Did the system time change, or is the server overloaded? >
Long time no see whoami. You will notice that this thread has now been placed into the Inactive Plugin subforum. If you wish to revive this plugin, please ensure that you update and test compatibility with the latest recommended Bukkit build before reporting your original post, asking for it to be moved back to the release forum. Thanks for your time. md_5