localp={}functionp.main(frame)localoutput=''localpingees_hidden={}localpingees_visible={}localpframe=frame:getParent()-- process all usernamesfori,arginpairs(pframe.args)doif(arg~='')then-- (ignore empty usernames)ifp.isPingeable(arg)==1thentable.insert(pingees_visible,p.pingUser(arg))else-- user created [[Special:MyPage/noping]], to not appear visibly in @pingtable.insert(pingees_hidden,p.pingUser(arg))endendendif(next(pingees_hidden)==nilandnext(pingees_visible)==nil)thenoutput="'''<strong class='error'>Error: No username specified!</strong>'''"else-- fill in the hidden pingees spanif(#pingees_hidden>0)thenmw.log('Invisible pingees are present')output=output..'<span style="display:none;">'output=output..table.concat(pingees_hidden," ")output=output..'</span>'end-- fill in the visible pingees, comma separatedif(#pingees_visible>0)thenoutput=output..'@'output=output..table.concat(pingees_visible,", ")output=output..':'endendreturnoutputend-- checks whether user created [[Special:MyPage/noping]], to not appear visibly in @pingfunctionp.isPingeable(username)if(string.match(username,"="))thenreturnnilendlocalsuccess,pageObject=pcall(mw.title.new,'User:'..username..'/noping')ifnotsuccessornotpageObjectthenreturnnilelseifpageObject.id==0thenreturn1elsereturn0endendend-- returns a pingfunctionp.pingUser(username)string.gsub(username,"&","&")localfoo='[[User:'..username..'|'..username..']]'returnfoo--if p.isPingeable(username) == 0 then--pingtext = '<span style="display:none;>' .. pingtext .. '</span>'-- --else-- --pingtext = pingtext .. ', '-- end-- return pingtextendreturnp