Advertisement
Xzempt

Untitled

Jul 23rd, 2011
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.15 KB | None | 0 0
  1. spammed = { "off" }
  2. if not awayFrame then
  3.     awayFrame = CreateFrame("Frame")
  4.  
  5. end
  6.  local frame = awayFrame
  7.  frame:RegisterEvent("CHAT_MSG_SYSTEM")
  8.  frame:SetScript("OnEvent", function(self, event, ...)
  9.        local system_msg = select(1, ...)
  10.        if (system_msg:find("You are now Away: Away") ~= nil) then
  11.        Logout()
  12.        end
  13.        if (system_msg:find("%u:%s%d(.*).%d(.*)%s%u%l%l%l%s") ~= nil) and (spammed[1] == "on") then
  14.           local found = string.sub(system_msg, string.find(system_msg, "%u:%s%d(.*).%d(.*)%s%u%l%l%l%s", 2))
  15.           ipsysmsg = string.sub(found, string.find(found, "%d(.*).(.*).(.*).(.*)%d"))
  16.           spammed = { "off" }
  17.           outSAY(".ban ip " ..ipsysmsg.. " -1d Advertising")
  18.     end
  19. end)
  20.  
  21. --spam_msg:find("<www(.*)elf-wow(.*)com>")
  22. if not spamFrame then
  23.     spamFrame = CreateFrame("Frame")
  24.  end
  25.  local frame = spamFrame
  26.  frame:RegisterEvent("CHAT_MSG_SAY")
  27.  frame:SetScript("OnEvent", function(self, event, ...)
  28.        local spam_msg = select(1, ...)
  29.        if (spam_msg:find("<www%.elf%-wow%.com>") ~= nil) then
  30.           spammed = { "on" }
  31.           outSAY(".pinfo " ..arg2)
  32.           outSAY(".ban char " ..arg2.. " -1d Advertising")
  33.        end
  34. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement