Skip to content

Alcheri/MyDNS

MyDNS

Tests Lint CodeQL Python Black Limnoria

Alternative DNS lookup plugin for Limnoria with GeoIP enrichment.

Features

  • Resolves hostnames, URLs, nick hostmasks, IPv4, and IPv6.
  • Performs reverse DNS for IP addresses.
  • Uses multiple GeoIP providers and selects the most complete result.
  • Prefers globally-routable addresses when multiple DNS answers are available.
  • Displays country flags using Unicode emoji derived from country code.

Installation

From your Limnoria plugins directory (for example, ~/runbot/plugins):

git clone https://github.com/Alcheri/MyDNS.git

Install dependencies from the plugin directory:

pip install --upgrade -r requirements.txt

If needed, unload the built-in Internet plugin to avoid command overlap:

/msg yourbot unload Internet

Load the plugin:

/msg yourbot load MyDNS

Configuration

Optional API key (recommended for better provider coverage):

config plugins.MyDNS.ipstackAPI your_api_key_here

Provider order (comma-separated). Default:

config plugins.MyDNS.geoipProviderOrder ipstack,ipapi

Example with free providers first:

config plugins.MyDNS.geoipProviderOrder ipapi,ipstack

The ip-api provider uses plaintext HTTP and is disabled by default. To opt in:

config plugins.MyDNS.allowInsecureGeoIP True
config plugins.MyDNS.geoipProviderOrder ipapi,ipstack,ip-api

Per-user channel cooldown in seconds. Default:

config channel #channel plugins.MyDNS.cooldownSeconds 5

Enable per channel:

config channel #channel plugins.MyDNS.enable True

Disable per channel:

config channel #channel plugins.MyDNS.enable False

Usage

@dns <hostname | URL | nick | IPv4 | IPv6>

Example

<Barry> @dns example.com
<Borg> DNS: example.com resolves to [93.184.216.34] LOC: City: Los Angeles State: California Long: -118.2437 Lat: 34.0522 Country Code: US Country: United States 🇺🇸 Post/Zip Code: 90012

<Barry> @dns 203.7.22.140
<Borg> DNS: <203-7-22-140> [203-7-22-140.dyn.iinet.net.au <> 203.7.22.140] LOC: City: Ballarat State: Victoria Long: 143.8470 Lat: -37.5633 Country Code: AU Country: Australia 🇦🇺 Post/Zip Code: 3350

Accuracy Notes

  • GeoIP is approximate and may differ from the host's physical location.
  • Private, loopback, link-local, and unroutable IPs cannot be geolocated reliably.
  • Best quality usually comes from globally-routable public IP addresses.
  • Results can vary between providers and over time.
  • Provider order is configurable with plugins.MyDNS.geoipProviderOrder.
  • Plaintext GeoIP providers require plugins.MyDNS.allowInsecureGeoIP.
  • Some IRC clients may not render flag emoji; country code is still shown.

Troubleshooting

If lookups fail or seem inaccurate:

  1. Confirm the plugin is loaded.
/msg yourbot list MyDNS
  1. Confirm the plugin is enabled in the current channel.
config channel #channel plugins.MyDNS.enable
  1. Reload after changes.
/msg yourbot reload MyDNS
  1. Add or verify your ipstack API key.
config plugins.MyDNS.ipstackAPI your_api_key_here

Copyright © 2016 - 2026, Barry Suridge

Licensed under the BSD 3-Clause License. See LICENCE for details.

About

An alternative to Limnoria's DNS function.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Contributors

Languages