Skip to content

Commit

Permalink
Update ledokol.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
RoLex committed Aug 16, 2014
1 parent 22a019a commit 14c4f49
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions ledokol.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8057,6 +8057,16 @@ else -- user
info = info .. " " .. string.format (gettext ("IP range: %s - %s"), geoip ["range_low"], geoip ["range_high"]) .. "\r\n" -- range
end

if geoip ["country_code"] then
local extra = ""

if geoip ["country"] then
extra = "=" .. geoip ["country"]
end

info = info .. " " .. gettext ("Country: %s"):format (geoip ["country_code"] .. extra) .. "\r\n" -- country code and country
end

if geoip ["city"] then
info = info .. " " .. string.format (gettext ("City: %s"), geoip ["city"]) .. "\r\n" -- city
end
Expand All @@ -8071,16 +8081,6 @@ else -- user
info = info .. " " .. string.format (gettext ("Region: %s"), geoip ["region_code"] .. extra) .. "\r\n" -- region code and region
end

if geoip ["country_code"] then
local extra = ""

if geoip ["country"] then
extra = "=" .. geoip ["country"]
end

info = info .. " " .. string.format (gettext ("Country: %s"), geoip ["country_code"] .. extra) .. "\r\n" -- country code and country
end

if geoip ["continent_code"] then
local extra = ""

Expand Down Expand Up @@ -8204,6 +8204,16 @@ function showipinfo (nick, ip)
info = info .. " " .. string.format (gettext ("IP range: %s - %s"), geoip ["range_low"], geoip ["range_high"]) .. "\r\n" -- range
end

if geoip ["country_code"] then
local extra = ""

if geoip ["country"] then
extra = "=" .. geoip ["country"]
end

info = info .. " " .. gettext ("Country: %s"):format (geoip ["country_code"] .. extra) .. "\r\n" -- country code and country
end

if geoip ["city"] then
info = info .. " " .. string.format (gettext ("City: %s"), geoip ["city"]) .. "\r\n" -- city
end
Expand All @@ -8218,16 +8228,6 @@ function showipinfo (nick, ip)
info = info .. " " .. string.format (gettext ("Region: %s"), geoip ["region_code"] .. extra) .. "\r\n" -- region code and region
end

if geoip ["country_code"] then
local extra = ""

if geoip ["country"] then
extra = "=" .. geoip ["country"]
end

info = info .. " " .. string.format (gettext ("Country: %s"), geoip ["country_code"] .. extra) .. "\r\n" -- country code and country
end

if geoip ["continent_code"] then
local extra = ""

Expand Down

0 comments on commit 14c4f49

Please sign in to comment.