]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
geoip: make the GeoIP module a standalone
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Tue, 10 Feb 2009 00:19:03 +0000 (01:19 +0100)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Tue, 10 Feb 2009 00:19:03 +0000 (01:19 +0100)
The geoip plugin defines and makes use of a GeoIP module to handle the
actual geoip data retrieval. The module used to be defined in the same
namespace as the plugin, and therefore in a barely accessible anonymous
module.

Move the GeoIP module to the outermost namespace to allow it to be
accessible from scripts and plugins too.

data/rbot/plugins/geoip.rb

index 6cf0d993238e02d83c8eb5568ba1366ea411b717..615511728df524469571276977a16965ac1579f7 100755 (executable)
@@ -9,7 +9,7 @@
 #
 # Resolves the geographic locations of users (network-wide) and IP addresses
 
-module GeoIP
+module ::GeoIP
   class InvalidHostError < RuntimeError; end
 
   GEO_IP_PRIMARY   = "http://lakka.kapsi.fi:40086/lookup.yaml?host="