Module:Rfx and Module:Rfx/sandbox: Difference between pages
(Difference between pages)
imported>Stjn replace checks for categories with a call to mw.title’s `categories` |
imported>Theleekycauldron move out here |
||
| Line 90: | Line 90: | ||
end | end | ||
end | end | ||
return false | return false | ||
end | end | ||
| Line 157: | Line 147: | ||
-- Switch to reconfirmation request for adminship if in that category | -- Switch to reconfirmation request for adminship if in that category | ||
if umatch( | |||
if | pageText, | ||
'%[%[[%s_]*[cC][aA][tT][eE][gG][oO][rR][yY][%s_]*:[%s_]*[rR]econfirmation requests for adminship(.-)[%s_]*%]%]' | |||
) then | |||
data.type = 'rrfa' | data.type = 'rrfa' | ||
end | end | ||
| Line 281: | Line 273: | ||
local rfxType = data.type | local rfxType = data.type | ||
if rfxType == 'rfa' or rfxType == 'rrfa' then | if rfxType == 'rfa' or rfxType == 'rrfa' then | ||
if | if umatch( | ||
pageText, | |||
'%[%[[%s_]*[cC][aA][tT][eE][gG][oO][rR][yY][%s_]*:[%s_]*[sS]uccessful requests for adminship(.-)[%s_]*%]%]' | |||
) then | |||
return 'successful' | return 'successful' | ||
elseif | elseif umatch( | ||
pageText, | |||
'%[%[[%s_]*[cC][aA][tT][eE][gG][oO][rR][yY][%s_]*:[%s_]*[uU]nsuccessful requests for adminship(.-)[%s_]*%]%]' | |||
) then | |||
return 'unsuccessful' | return 'unsuccessful' | ||
end | end | ||
elseif rfxType == 'rfb' then | elseif rfxType == 'rfb' then | ||
if | if umatch( | ||
pageText, | |||
'%[%[[%s_]*[cC][aA][tT][eE][gG][oO][rR][yY][%s_]*:[%s_]*[sS]uccessful requests for bureaucratship(.-)[%s_]*%]%]' | |||
) then | |||
return 'successful' | return 'successful' | ||
elseif | elseif umatch( | ||
pageText, | |||
'%[%[[%s_]*[cC][aA][tT][eE][gG][oO][rR][yY][%s_]*:[%s_]*[uU]nsuccessful requests for bureaucratship(.-)[%s_]*%]%]' | |||
) then | |||
return 'unsuccessful' | return 'unsuccessful' | ||
end | end | ||