Skip to content

Instantly share code, notes, and snippets.

@FloooD
Created May 8, 2011 23:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FloooD/961785 to your computer and use it in GitHub Desktop.
Save FloooD/961785 to your computer and use it in GitHub Desktop.
prevents server from being crashed by spammerfags
if not antispam then antispam = {}
antispam.blocked = {}
function antispam.unblock(id)
antispam.blocked[tonumber(id)] = nil
end
function antispam.generic(id)
if antispam.blocked[id] then
return 1
else
antispam.blocked[id] = true
timer(200, "antispam.unblock", tostring(id))
end
end
addhook("say", "antispam.generic")
addhook("sayteam", "antispam.generic")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment