From 57edfbc5a4fa8c039ff5db92ded9dc7f8937fbc1 Mon Sep 17 00:00:00 2001 From: Chris Porter Date: Sat, 14 Oct 2023 19:57:52 +0100 Subject: [PATCH] LUA: remove country library now redundant as the indexing is abstracted --- lua/lib/bootstrap.lua | 1 - lua/lib/country.lua | 33 --------------------------------- 2 files changed, 34 deletions(-) delete mode 100644 lua/lib/country.lua diff --git a/lua/lib/bootstrap.lua b/lua/lib/bootstrap.lua index 1c2e3cce..58f58e30 100644 --- a/lua/lib/bootstrap.lua +++ b/lua/lib/bootstrap.lua @@ -4,7 +4,6 @@ require("lib/missing") require("lib/scheduler") require("lib/schedule-legacy") require("lib/serialise") -require("lib/country") require("lib/db") require("lib/socket") require("lib/json") diff --git a/lua/lib/country.lua b/lua/lib/country.lua deleted file mode 100644 index 50f65207..00000000 --- a/lua/lib/country.lua +++ /dev/null @@ -1,33 +0,0 @@ -local countries = { "--","AP","EU","AD","AE","AF","AG","AI","AL","AM","AN","AO","AQ","AR","AS","AT","AU","AW","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BM","BN","BO","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","FX","GA","GB","GD","GE","GF","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IN","IO","IQ","IR","IS","IT","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","ST","SV","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TM","TN","TO","TP","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","YU","ZA","ZM","ZR","ZW","A1","A2","O1" } -local countryhash - -function countrylookup(id) - return countries[id + 1] -end - -function countrynamelookup(country) - if not countryhash then - local i = 0 - countryhash = {} - - for k, v in pairs(countries) do - countryhash[v] = k - 1 - end - end - - return countryhash[country] -end - -function countryindex(country) - local i = 1 - - for v in pairs(countries) do - if countries[i] == country then - return i - 1 - end - i = i + 1 - end - - return -1 -end -