Liberty Unleashed
Scripting => Script Releases => Topic started by: sasha19323 on April 22, 2013, 06:04:29 pm
-
This is simple script, which can protect your server from flood or spam. It's kick the spamer after 3 same messages
Download: Dropbox (https://dl.dropboxusercontent.com/u/85589430/SpamProtection.rar)
-
Good job Alex :D
-
Thx^^
-
My version of this script
lastmsg <- array(20);
lastmsg2 <- array(20);
lastmsg3 <- array(20);
local kick = 0;
function onPlayerChat( player, text )
{
if ( ( text == lastmsg[player.ID] ) && ( text == lastmsg2[player.ID] ) && ( text == lastmsg3[player.ID] ) && ( player.Muted == false ) )
{
if ( kick < 3 )
{
player.Muted = true;
NewTimer( "MutedPlayer", 15000, 1, player );
Message( player + " has muted ( 15 sec. )" );
kick += 1;
}
else
{
Message( "Kicking " + player + " (Spam)" );
KickPlayer( player ); // Here can be kick or just notification
kick = 0;
}
lastmsg[player.ID] = array(20);
lastmsg2[player.ID] = array(20);
lastmsg3[player.ID] = array(20);
}
lastmsg3[player.ID] = lastmsg2[player.ID];
lastmsg2[player.ID] = lastmsg[player.ID];
lastmsg[player.ID] = text;
return 1;
}
function MutedPlayer( plr )
{
plr.Muted = false;
Message( plr + " has unmuted" );
}
-
Timers, bleh. Also, this is an anti repeat. It would have to be more advanced to be a spam protection script.
-
I post this "script" for time when spam attack was actual. Now is no need to use this ;)
-
I post this "script" for time when spam attack was actual. Now is no need to use this ;)
Good anti spam, i not use it, but it's good.
-
I post this "script" for time when spam attack was actual. Now is no need to use this ;)
Security scripts are always welcome and needed! :D