From: Andrew Lewis Date: Wed, 20 Nov 2013 19:13:34 +0000 (+0200) Subject: More concise ip_to_rbl function X-Git-Tag: 0.6.0~31^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e35a8012347fa4cff4d6c3eca2f69fd1f96a336d;p=thirdparty%2Frspamd.git More concise ip_to_rbl function --- diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua index 2a395256f3..9c577e8148 100644 --- a/src/plugins/lua/rbl.lua +++ b/src/plugins/lua/rbl.lua @@ -17,14 +17,7 @@ local rbls = {} local function ip_to_rbl(ip, rbl) - octets = ip:inversed_str_octets() - local str = '' - for _,o in ipairs(octets) do - str = str .. o .. '.' - end - str = str .. rbl - - return str + return table.concat(ip:inversed_str_octets(), ".") .. '.' .. rbl end local function rbl_cb (task)