From d27208b405fdc7801c87e724665d78972198f70c Mon Sep 17 00:00:00 2001 From: deuce <> Date: Sat, 9 Apr 2011 21:10:50 +0000 Subject: [PATCH] GeoIP has changed everything. --- exec/ircbots/weather/weather_functions.js | 4 ++-- exec/ircbots/whereis/whereis.js | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/exec/ircbots/weather/weather_functions.js b/exec/ircbots/weather/weather_functions.js index 08cfdf4407..1b6c9ef0bb 100644 --- a/exec/ircbots/weather/weather_functions.js +++ b/exec/ircbots/weather/weather_functions.js @@ -11,11 +11,11 @@ function get_nicklocation(srv,nick) if(userhost.indexOf('.')==-1) userhost += (srv.users[cmd[1].toUpperCase()].servername.replace(/^[^\.]+\./,'.')); geo=get_geoip(userhost); - ret=geo.Latitude+','+geo.Longitude; + ret=geo.latitude+','+geo.longitude; if(ret=='0,0') { userhost=srv.users[nick.toUpperCase()].servername geo=get_geoip(userhost); - ret=geo.Latitude+','+geo.Longitude; + ret=geo.latitude+','+geo.longitude; } return ret; } diff --git a/exec/ircbots/whereis/whereis.js b/exec/ircbots/whereis/whereis.js index 55727ddd59..55d79c14d5 100644 --- a/exec/ircbots/whereis/whereis.js +++ b/exec/ircbots/whereis/whereis.js @@ -18,7 +18,7 @@ Bot_Commands["WHEREIS"].command = function (target,onick,ouh,srv,lvl,cmd) { if(userhost.indexOf('.')==-1) userhost += (srv.users[nick.toUpperCase()].servername.replace(/^[^\.]+\./,'.')); geo=get_geoip(userhost); - if(geo.CountryName=='Reserved') { + if(geo.countryName=='Reserved') { userhost=srv.users[nick.toUpperCase()].servername geo=get_geoip(userhost); } @@ -49,16 +49,16 @@ Bot_Commands["WHEREIS"].command = function (target,onick,ouh,srv,lvl,cmd) { location=get_nicklocation(find); if (location) { lstr=find+' is '; - if(location.City=='') + if(location.cityName=='') lstr += 'somewhere in '; else - lstr += 'around '+location.City+', '; + lstr += 'around '+location.cityName+', '; - if(location.RegionName!='') - lstr += location.RegionName+', '; + if(location.regionName!='') + lstr += location.regionName+', '; - if(location.CountryName!='') - lstr += location.CountryName; + if(location.countryName!='') + lstr += location.countryName; } else { var usr = new User(system.matchuser(cmd[1])); -- GitLab