Modulo:IP validator: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
mNessun oggetto della modifica |
Nessun oggetto della modifica |
||
Riga 3:
function str.is_ipv4( frame )
local s = frame.args[1] or '';
if not string.
return '0'
end
for substr in string.gmatch(s, "(%d+)") do
and not string.find(substr, "^1[0-9][0-9]$")
and not string.find(substr, "^25[0-5]$") then
return '0'
end
Riga 22:
function str.is_ipv6( frame )
local s = frame.args[1] or '';
if not string.
return '0'
end
for substr in string.gmatch(s, "(%w+)") do
return '0'
end
Line 46 ⟶ 44:
return '1';
else
end
end
|