Advertisement
Guest User

Untitled

a guest
Dec 7th, 2013
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local function scamCheck(data)
  2.     if type(data) == "table" then
  3.     for k,v in pairs(table) do
  4.         if scamCheck(v) then break end
  5.     end
  6.     elseif type(data) == "string" and (string.find(data, "SendMail") or string.find(data, "SetTradeMoney")) then
  7.     print("|cffffff00The Aura you are importing contains code to send or trade gold to other players, please watch out!|r")
  8.     return true
  9.     end
  10. end
  11.  
  12. function WeakAuras.ImportString(str)
  13.     local received = WeakAuras.StringToTable(str, true);
  14.     if(received and type(received) == "table" and received.m) then
  15.         if(received.m == "d") then
  16.             tooltipLoading = nil;
  17.             if(version < received.v) then
  18.                 local errorMsg = L["Version error recevied higher"]
  19.                 WeakAuras.ShowTooltip({
  20.                     {1, "WeakAuras", 0.5333, 0, 1},
  21.                     {1, errorMsg:format(received.s, versionString), 1, 0, 0}
  22.                 });
  23.             else
  24.                 local data = received.d;
  25.                 WeakAuras.ShowDisplayTooltip(data, received.c, received.i, received.a, "unknown", true)
  26.                 --Scam protection
  27.         scamCheck(data)
  28.             end
  29.         end
  30.     elseif(type(received) == "string") then
  31.         WeakAuras.ShowTooltip({
  32.             {1, "WeakAuras", 0.5333, 0, 1},
  33.             {1, received, 1, 0, 0, 1}
  34.         });
  35.     end
  36. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement