Revision as of 13:30, 16 February 2022 by imported>Dreamy Jazz(Ensure that the first letter of the username is upper case in the username inside SPI archive notice calls)
This module is rated as ready for general use. It has reached a mature state, is considered relatively stable and bug-free, and may be used wherever appropriate. It can be mentioned on help pages and other Wikipedia resources as an option for new users. To minimise server load and avoid disruptive output, improvements should be developed through sandbox testing rather than repeated trial-and-error editing.
localmRedirect=require('Module:Redirect')localgetArgs=require('Module:Arguments').getArgslocalisIPOrRange=require('Module:IPAddress').isIpOrRangelocalp={}-- function p.checkIfSPIMayNeedRename(frame)-- local args = getArgs(frame)-- return p._checkIfSPIMayNeedRename(args)-- endfunctionp.checkIfSPIMayNeedRename(frame)localargs=getArgs(frame)-- Fix capitlisation of the usernameargs[1]=mw.ustring.upper(args[1]:sub(1,1))..args[1]:sub(2)if(isIPOrRange(frame)~='')thenreturn'no'elseif(mw.title.new('User talk:'..args[1]):getContent()==nilandmw.title.new('User:'..args[1]):getContent()==nil)thenreturn'yes_no_user_content'elselocalredirectTarget=mRedirect.getTarget('User talk:'..args[1])if(redirectTarget~=nil)thenif(mw.ustring.find(redirectTarget,'^User:'..args[1])ormw.ustring.find(redirectTarget,'^User talk:'..args[1]))thenreturn'no'elsereturn'yes_redirected_elsewhere'endelsereturn'no'endendendreturnp