Liberty Unleashed

Scripting => Script Releases => Topic started by: sasha19323 on April 22, 2013, 06:04:29 pm

Title: Spam Protection
Post 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)
Title: Re: Spam Protection
Post by: Merkel on April 22, 2013, 06:12:15 pm
Good job Alex :D
Title: Re: Spam Protection
Post by: sasha19323 on April 22, 2013, 09:27:39 pm
Thx^^
Title: Re: Spam Protection
Post by: GTASAnek on June 26, 2013, 09:09:02 pm
My version of this script
Code: [Select]
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" );
}

Title: Re: Spam Protection
Post by: Shadow. on June 27, 2013, 08:57:49 am
Timers, bleh. Also, this is an anti repeat. It would have to be more advanced to be a spam protection script.
Title: Re: Spam Protection
Post by: sasha19323 on June 27, 2013, 05:21:53 pm
I post this "script" for time when spam attack was actual. Now is no need to use this  ;)
Title: Re: Spam Protection
Post by: Yamaza on June 28, 2013, 01:20:33 pm
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.
Title: Re: Spam Protection
Post by: SugarD on July 08, 2013, 04:29:58 pm
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