diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2009-02-10 01:08:00 +0100 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2009-02-10 01:17:00 +0100 |
commit | 5aa8e259191ffc0551dd77b67a77e34c8bd8aa42 (patch) | |
tree | 400b29d1ad1fc06e510f87a8965ca520c370f135 /data/rbot/plugins/geoip.rb | |
parent | e2dc08da6b19d0e4fdb2f0a71b0c89e6477c5605 (diff) |
geoip: also read lat/lon coordinates
GeoIP tool also offer latitude and longitude, so read them as well.
Diffstat (limited to 'data/rbot/plugins/geoip.rb')
-rwxr-xr-x | data/rbot/plugins/geoip.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/data/rbot/plugins/geoip.rb b/data/rbot/plugins/geoip.rb index 96dcf9d2..6cf0d993 100755 --- a/data/rbot/plugins/geoip.rb +++ b/data/rbot/plugins/geoip.rb @@ -19,7 +19,9 @@ module GeoIP REGEX = { :country => %r{Country:.*?<a href=".*?" target="_blank"> (.*?)</a>}m, :region => %r{Region:.*?<a href=".*?" target="_blank">(.*?)</a>}m, - :city => %r{City:.*?<td align="left" class="arial_bold">(.*?)</td>}m + :city => %r{City:.*?<td align="left" class="arial_bold">(.*?)</td>}m, + :lat => %r{Latitude:.*?<td align="left" class="arial_bold">(.*?)</td>}m, + :lon => %r{Longitude:.*?<td align="left" class="arial_bold">(.*?)</td>}m } def self.valid_host?(hostname) |