Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function scamCheck(data)
- if type(data) == "table" then
- for k,v in pairs(table) do
- if scamCheck(v) then break end
- end
- elseif type(data) == "string" and (string.find(data, "SendMail") or string.find(data, "SetTradeMoney")) then
- print("|cffffff00The Aura you are importing contains code to send or trade gold to other players, please watch out!|r")
- return true
- end
- end
- function WeakAuras.ImportString(str)
- local received = WeakAuras.StringToTable(str, true);
- if(received and type(received) == "table" and received.m) then
- if(received.m == "d") then
- tooltipLoading = nil;
- if(version < received.v) then
- local errorMsg = L["Version error recevied higher"]
- WeakAuras.ShowTooltip({
- {1, "WeakAuras", 0.5333, 0, 1},
- {1, errorMsg:format(received.s, versionString), 1, 0, 0}
- });
- else
- local data = received.d;
- WeakAuras.ShowDisplayTooltip(data, received.c, received.i, received.a, "unknown", true)
- --Scam protection
- scamCheck(data)
- end
- end
- elseif(type(received) == "string") then
- WeakAuras.ShowTooltip({
- {1, "WeakAuras", 0.5333, 0, 1},
- {1, received, 1, 0, 0, 1}
- });
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement