hey guys, can someone fix this function?
ctrl + left click on chat frame to automatically report spammer
since 8.0, it's broken
Lua Code:
-- Ctrl + left click to report spamer
local _ChatFrame_OnHyperlinkShow = ChatFrame_OnHyperlinkShow;
function ChatFrame_OnHyperlinkShow (chatframe,link,text,button)
if IsControlKeyDown() then
local line = string.match(link,"player:[^:]+:(%d+):");
if line then
ReportPlayer("spam",line);
return;
end
end
return _ChatFrame_OnHyperlinkShow (chatframe,link,text,button);
end
error detail
Lua Code:
attempt to call global 'ReportPlayer' (a nil value)
Count: 1
Call Stack:
[C]: in function `ReportPlayer'
in function `ChatFrame_OnHyperlinkShow'
[string "*:OnHyperlinkClick"]:1: in function <[string "*:OnHyperlinkClick"]:1>