Shadow19

Block filter for DPE

Jan 1st, 2017
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.43 KB | None | 0 0
  1. begin
  2.     File.binwrite("filters/block.list","[]") if !File.file?("filters/block.list")
  3.     decoy["block"] = eval(File.binread("filters/block.list")) if !decoy["block"]
  4.     if data.getAttr("u") and (data.tag?("m") or data.tag?("p") or data.tag?("z") or data.tag?("u") or data.tag?("a"))
  5.         id = data.getAttr("u")[/(.+?[^\D]{1,})/]
  6.         if decoy["block"].index(id)
  7.             data = false
  8.         end
  9.     end
  10. rescue
  11. end
Advertisement
Add Comment
Please, Sign In to add comment