Modul:UserLinks/extra: Perbedaan antara revisi

Konten dihapus Konten ditambahkan
Murbaut (bicara | kontrib)
←Membuat halaman berisi '-------------------------------------------------------------------------------- -- This module holds extra link functions for use with Modul:UserLinks. -- -- It i...'
 
Tidak ada ringkasan suntingan
 
Baris 47:
function linkFunctions.http(snippets)
-- To see if an IP is serving a web page
 
local host = snippets.username
if not host:match('^%d+%.%d+%.%d+%.%d+$') then
if host:match('^[%x:]+$') then
-- It's IPv6, use RFC 3986 IP-Literal syntax
host = '[' .. host .. ']'
else
-- It's neither IPv4 nor IPv6, return nothing
return ''
end
end
 
return makeUrlLink(
{
protocol = 'http',
host = snippets.usernamehost
},
'http'
Baris 151 ⟶ 163:
{
protocol = 'https',
host = 'wwwtools.robtexwmflabs.comorg',
path = '/ipwhois/' gateway.. snippets.username .. '.htmlpy',
fragmentquery = 'whois'{
lookup = 'true',
ip = snippets.username,
},
},
'WHOIS'
Baris 169 ⟶ 184:
.. snippets.username,
'links to user page'
)
end
 
function linkFunctions.cr(snippets)
-- Change rights
return makeWikilink(
snippets.interwiki,
-1,
'UserRights/' .. snippets.username,
'change rights'
)
end