Created
May 8, 2011 23:05
-
-
Save FloooD/961785 to your computer and use it in GitHub Desktop.
prevents server from being crashed by spammerfags
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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