aboutsummaryrefslogtreecommitdiffstats
path: root/util/ip.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-11-10 05:42:32 +0100
committerKim Alvefur <zash@zash.se>2017-11-10 05:42:32 +0100
commit1438a3884507b709cba08691d329b0cf137f4bd4 (patch)
tree9186c5db947b241b5590afab18bd6e720f95046a /util/ip.lua
parent8962abd55b75a572b0e5821f11cd3342e09b113b (diff)
downloadprosody-1438a3884507b709cba08691d329b0cf137f4bd4.tar.gz
prosody-1438a3884507b709cba08691d329b0cf137f4bd4.zip
util: Various minor changes to please [luacheck]
Diffstat (limited to 'util/ip.lua')
-rw-r--r--util/ip.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/util/ip.lua b/util/ip.lua
index 81a98ef7..4526ae76 100644
--- a/util/ip.lua
+++ b/util/ip.lua
@@ -9,7 +9,12 @@ local ip_methods = {};
local ip_mt = { __index = function (ip, key) return (ip_methods[key])(ip); end,
__tostring = function (ip) return ip.addr; end,
__eq = function (ipA, ipB) return ipA.addr == ipB.addr; end};
-local hex2bits = { ["0"] = "0000", ["1"] = "0001", ["2"] = "0010", ["3"] = "0011", ["4"] = "0100", ["5"] = "0101", ["6"] = "0110", ["7"] = "0111", ["8"] = "1000", ["9"] = "1001", ["A"] = "1010", ["B"] = "1011", ["C"] = "1100", ["D"] = "1101", ["E"] = "1110", ["F"] = "1111" };
+local hex2bits = {
+ ["0"] = "0000", ["1"] = "0001", ["2"] = "0010", ["3"] = "0011",
+ ["4"] = "0100", ["5"] = "0101", ["6"] = "0110", ["7"] = "0111",
+ ["8"] = "1000", ["9"] = "1001", ["A"] = "1010", ["B"] = "1011",
+ ["C"] = "1100", ["D"] = "1101", ["E"] = "1110", ["F"] = "1111",
+};
local function new_ip(ipStr, proto)
if not proto then