Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if not awayFrame then
- awayFrame = CreateFrame("Frame")
- end
- local frame = awayFrame
- frame:RegisterEvent("CHAT_MSG_SYSTEM")
- frame:SetScript("OnEvent", function(self, event, ...)
- local system_msg = select(1, ...)
- if (system_msg:find("You are now Away: Away") ~= nil) then
- Logout()
- end
- if (system_msg:find("%u:%s%d(.*).%d(.*)%s%u%l%l%l%s") ~= nil) and (spammed[1] == "on") then
- local found = string.sub(system_msg, string.find(system_msg, "%u:%s%d(.*).%d(.*)%s%u%l%l%l%s", 2))
- ipsysmsg = string.sub(found, string.find(found, "%d(.*).(.*).(.*).(.*)%d"))
- spammed = { "off" }
- outSAY(".ban ip " ..ipsysmsg.. " 1s Advertising")
- print(ipsysmsg)
- end
- end)
- if not ipFrame then
- spamFrame = CreateFrame("Frame")
- end
- local frame = spamFrame
- frame:RegisterEvent("CHAT_MSG_SAY")
- frame:SetScript("OnEvent", function(self, event, ...)
- local spam_msg = select(1, ...)
- if (spam_msg:find("elf(.*)wow(.*)com") ~= nil) then
- local found = arg1
- spammed = { "on" }
- outSAY(".pinfo " ..arg2)
- outSAY(".ban char " ..arg2.. " 1s Advertising")
- print(found)
- print(arg2)
- SendChatMessage("Elf-wow spam detected, will proceedd to ban function as planned! Banning " ..arg2, "SAY")
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement