This plugin is currently marked as broken and unavailable for download
MrBlue
Provides an API to obtain IP address information from a local database

Supported Games
GameServerKingsGameServerKings

[B]GeoIP[/B] provides an API to obtain IP address information from a local database. The plugin downloads and uses a [URL='https://github.com/lukespragg/geoip-json']JSON-formatted MaxMind GeoLite2 database[/URL] locally, so no web requests are needed beyond the database download and updates.

Keep in mind that alone this does nothing, as it's an API meant for plugins to utilize. To use this with a supported plugin, simply install like you would any other plugin!

GeoLite2 databases are free IP geolocation databases comparable to, but less accurate than, MaxMind’s GeoIP2 databases. GeoLite2 databases are updated on the first Tuesday of each month. The GeoLite2 databases are distributed under the [URL='http://creativecommons.org/licenses/by-sa/3.0/'][I]Creative Commons Attribution-ShareAlike 3.0 Unported License[/I][/URL].

[B]Plugin Developers[/B]To call the functions from this API, your plugin needs to get the plugin instance.[CODE=c#][PluginReference]Plugin GeoIP;[/CODE][CODE=lua]local geoIp = plugins.Find("GeoIP")[/CODE]

You can then use the function you'd like to get information for the specified IP.[CODE=c#]GeoIP?.Call("GetCountry", "8.8.8.8");[/CODE][CODE=lua]geoIp:CallHook("GetCountry", "8.8.8.8")[/CODE][B]Functions:[/B] GetCountry(string ip), GetCountryCode(string ip), GetContinent(string ip), GetContinentCode(string ip), GetLocale(string ip).

[B]Example Plugins[/B][CODE=c#]using Oxide.Core.Plugins;

namespace Oxide.Plugins{[Info("GeoIP Test", "Wulf / Luke Spragg", 0.1)][Description("GeoIP test plugin.")]class GeoIPTest : RustPlugin{[PluginReference]Plugin GeoIP;

    void Loaded()
    {
        if (!GeoIP)
        {
            Puts("GeoIP is not loaded! http://oxidemod.org/plugins/1365/");
            return;
        }
        var country = GeoIP.Call("GetCountry", "8.8.8.8");
        Puts("Country name for IP 8.8.8.8 is "   country);
    }
}

}[/code][CODE=lua]PLUGIN.Title = "GeoIP Test"PLUGIN.Version = V(0, 1, 0)PLUGIN.Description = "GeoIP test plugin."PLUGIN.Author = "Wulf / Luke Spragg"

function PLUGIN:Init()local geoIp = plugins.Find("GeoIP")if not geoIp then print("GeoIP is not loaded! http://oxidemod.org/plugins/1365/") return endlocal country = geoIp:CallHook("GetCountry", "8.8.8.8")print("Country name for IP 8.8.8.8 is " .. country)end[/CODE]

[I]This product includes GeoLite2 data created by MaxMind, available from [URL='http://www.maxmind.com/']http://www.maxmind.com[/URL].[/I]

MIT License, with distribution exclusivity for uMod.org


Copyright (c) 2020 Wulf


Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:


The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.


THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.