From b914022bc92847fd5ece0472be09b2032d24b58a Mon Sep 17 00:00:00 2001 From: Andreas Bielawski Date: Wed, 27 Jul 2016 11:54:00 +0200 Subject: [PATCH] =?UTF-8?q?=C3=9Cberfl=C3=BCssige=20Funktion=20entfernt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- otouto/utilities.lua | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/otouto/utilities.lua b/otouto/utilities.lua index a7602cb..83da24b 100644 --- a/otouto/utilities.lua +++ b/otouto/utilities.lua @@ -630,36 +630,6 @@ function is_sudo(msg, config) return var end --- http://stackoverflow.com/a/6081639/3146627 -function serializeTable(val, name, skipnewlines, depth) - skipnewlines = skipnewlines or false - depth = depth or 0 - - local tmp = string.rep(" ", depth) - - if name then tmp = tmp .. name .. " = " end - - if type(val) == "table" then - tmp = tmp .. "{" .. (not skipnewlines and "\n" or "") - - for k, v in pairs(val) do - tmp = tmp .. serializeTable(v, k, skipnewlines, depth + 1) .. "," .. (not skipnewlines and "\n" or "") - end - - tmp = tmp .. string.rep(" ", depth) .. "}" - elseif type(val) == "number" then - tmp = tmp .. tostring(val) - elseif type(val) == "string" then - tmp = tmp .. string.format("%q", val) - elseif type(val) == "boolean" then - tmp = tmp .. (val and "true" or "false") - else - tmp = tmp .. "\"[inserializeable datatype:" .. type(val) .. "]\"" - end - - return tmp -end - function post_petition(url, arguments, headers) local url, h = string.gsub(url, "http://", "") local url, hs = string.gsub(url, "https://", "")