Content deleted Content added
usertalk regex apparently was never set up |
turn "_" to " " just in case and also terminate at a # in sig searches |
||
Line 52:
end
--This is a bloody mess of a mix of ideas, but it mostly works, so
local function getUserMentions(text)
--Returns a list of users, and if they were considered a "participant" or someone who was just mentioned
Line 58:
--Timestamp is %d%d:%d%d, %d%d? %w+ %d%d%d%d %(UTC%)) but we allow some (minor) leniancy for those who just slightly edit their dates (why?) so that it still picks up
local timestampRegex = "((%d%d:%d%d, %d%d? %w+,? %d%d%d%d) %(UTC%))"
local userRegex = "(%[%[:?User:([^#|%]]+))"
local userTalkRegex = "(%[%[:?User[ _]talk:([^#|%]]+))"
local userContribRegex = "(%[%[:?Special:Contributions/([^#|%]]+))"
for line in string.gmatch(text,"[^\n]+") do
--Split by line and check all content on said line. This assumes all signatures never use newlines, which they should not be doing anyways.
Line 74:
break
end
identifier = string.gsub(identifier,"_"," ")
if not string.find(identifier,"/") then --Avoid subpage nonsense
mw.log("Found user on reg",reg,"name is",identifier)
|