Importer, Bürokraten, Moderatoren (CommentStreams), Strukturierte-Diskussionen-Bots, Oberflächenadministratoren, Push-Abonnementverwalter, Oversighter, Administratoren, Kampagnenbearbeiter (Hochladeassistent)
855
Bearbeitungen
KKeine Bearbeitungszusammenfassung |
K (30 Versionen von wikivoyage:Modul:UrlCheck importiert) |
||
| (7 dazwischenliegende Versionen von 3 Benutzern werden nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
-- | -- module variable and administration | ||
local | local uc = { | ||
suite = ' | moduleInterface = { | ||
suite = 'UrlCheck', | |||
serial = '2023-01-17', | |||
item = 40849609 | |||
} | |||
} | } | ||
function uc.ip4( address ) | function uc.ip4( address ) | ||
| Zeile 148: | Zeile 144: | ||
if uc.ip4( host ) then -- is ip4 address | if uc.ip4( host ) then -- is ip4 address | ||
return 2 | return 2 | ||
elseif not mw.ustring.match( host, '^[%w%.%-]+%.%a%a+$' ) then | elseif not mw.ustring.match( host, '^[ะ-๏%w%.%-]+%.%a%a+$' ) then | ||
-- Thai diacritical marks ะ (0E30) - ๏ (0E4F) | |||
return 22 | return 22 | ||
elseif not host:match( '^[%w%.%-]+%.%a%a+$' ) then | elseif not host:match( '^[%w%.%-]+%.%a%a+$' ) then | ||
| Zeile 175: | Zeile 172: | ||
local result = uc.isUrl( args.url, false ) | local result = uc.isUrl( args.url, false ) | ||
if args.show:lower() == 'msg' then | if args.show:lower() == 'msg' then | ||
local ui = mw.loadData( 'Module:UrlCheck/i18n') | |||
if ui[ result ] then | if ui[ result ] then | ||
return ui[ result ] | return ui[ result ] | ||