11-24-2015, 01:42 PM
(11-23-2015, 12:26 AM)DrMasik Wrote: AntiFlood it is simple antiflood plugin.
It is kick player.
There are 2 params into main.lua file:
gMsgDelay - Delay before send message by player
gWarningsBeforeKick - How many warnings before kick
Source:
Git
Better description:
Code:
This plugin kicks players that spam chat messages and commands too quickly.
There are two settings in the main.lua file:
[b]gMsgDelay[/b] - How many (seconds? Pretty sure this is actually Milliseconds) must a player wait between messages before their "Warning Level" goes up?
[b]gWarningsBeforeKick[/b] - How large can the "Warning Level" get before the plugin kicks them?
Suggestion 1:
Replace
local plUID = aPlayer:GetUniqueID();
with
local plUID = aPlayer:GetUUID();
Why? GetUUID will work if a player logs off and logs back on without the server restarting. GetUniqueID "forgets" when they log in/out, and actually has a chance to apply to a different player (I think. I might be wrong, but GetUUID is still smarter).
Suggestion 2:
Include an onDisable function and just return the default value.