Module:BRFA
Appearance
![]() | This template may have no transclusions. This is because it is substituted by a tool or script, it is used as part of a short-term or less active Wikipedia process, or for some other reason. |
Utility functions used by Wikipedia:Bots/Requests for approval/InputInit, which in turn is used by the "Create request page" form at WP:BRFA.
local p = {}
local function splitNameNumber( title )
-- First, name with number?
local name, number = title:match( '^Wikipedia:Bots/Requests for approval/(.-) (%d+)$' )
if name then
return name, number
end
-- Extract name
name = title:match( '^Wikipedia:Bots/Requests for approval/(.*)$' )
if name then
return name, ''
end
-- Punt
return title, ''
end
function p.botName( frame )
local name, number = splitNameNumber( frame.args[1] )
return name
end
function p.botNameNumber( frame )
local name, number = splitNameNumber( frame.args[1] )
return name .. '|' .. number
end
return p