Module:UserLinks/extra: Difference between revisions

Content deleted Content added
fix sul2 lang
add fa lr and mr
 
(11 intermediate revisions by 5 users not shown)
Line 31:
'COIBot'
)
end
 
function linkFunctions.fa(snippets)
-- Former admin label
return message('display-formeradmin')
end
 
function linkFunctions.ggl(snippets)
-- Google search for the username.
return makeUrlLink(
{
Line 42 ⟶ 47:
},
'Google'
)
end
 
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 = host
},
'http'
)
end
 
function linkFunctions.lr(snippets)
-- Local rights
return makeFullUrlLink(
snippets.interwiki,
-1,
'Log',
{page = 'User:' .. snippets.username},
message('display-localrights')
)
end
function linkFunctions.mr(snippets)
-- Meta user rights
return makeFullUrlLink(
'meta',
-1,
'Log',
{page = 'User:' .. snippets.username .. '@enwiki'},
message('display-metarights')
)
end
Line 56 ⟶ 106:
},
'message'
)
end
 
function linkFunctions.rbl(snippets)
-- Realtime blacklists
return makeUrlLink(
{
protocol = 'https',
host = 'www.robtex.com',
path = '/ip-lookup/' .. snippets.username .. '#dnsbl',
},
'RBLs'
)
end
 
function linkFunctions.rdns(snippets)
-- Reverse DNS lookup
return makeUrlLink(
{
protocol = 'https',
host = 'www.dnswatch.info',
path = '/dns/dnslookup',
query = {
la = 'en',
host = snippets.username,
submit = 'Resolve'
}
},
'RDNS'
)
end
Line 73 ⟶ 152:
return makeUrlLink(
{
protocol = 'httphttps',
host = 'www.stopforumspam.com',
path = '/search/' .. snippets.username,
Line 103 ⟶ 182:
'Log/newusers/' .. snippets.username,
'user creation'
)
end
 
function linkFunctions.whois(snippets)
-- WHOIS information for IPs
return makeUrlLink(
{
protocol = 'https',
host = 'tools.wmflabs.org',
path = '/whois/gateway.py',
query = {
lookup = 'true',
ip = snippets.username,
},
},
'WHOIS'
)
end
Line 116 ⟶ 211:
.. snippets.username,
'links to user page'
)
end
 
function linkFunctions.cr(snippets)
-- Change rights
return makeWikilink(
snippets.interwiki,
-1,
'UserRights/' .. snippets.username,
'change rights'
)
end