Author Topic: Spam Protection  (Read 2965 times)

sasha19323

  • Jr. Member
  • **
  • Posts: 99
  • Karma: +25/-24
    • View Profile
Spam Protection
« on: April 22, 2013, 07: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

Merkel

  • Jr. Member
  • **
  • Posts: 89
  • Karma: +4/-10
    • View Profile
Re: Spam Protection
« Reply #1 on: April 22, 2013, 07:12:15 pm »
Good job Alex :D
Westwood Studios

The best studios company in strategy videogames.

sasha19323

  • Jr. Member
  • **
  • Posts: 99
  • Karma: +25/-24
    • View Profile
Re: Spam Protection
« Reply #2 on: April 22, 2013, 10:27:39 pm »
Thx^^

GTASAnek

  • Newbie
  • *
  • Posts: 15
  • Karma: +4/-0
    • View Profile
Re: Spam Protection
« Reply #3 on: June 26, 2013, 10: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" );
}


Shadow.

  • Tester
  • Full Member
  • ****
  • Posts: 144
  • Karma: +16/-35
    • View Profile
Re: Spam Protection
« Reply #4 on: June 27, 2013, 09:57:49 am »
Timers, bleh. Also, this is an anti repeat. It would have to be more advanced to be a spam protection script.

sasha19323

  • Jr. Member
  • **
  • Posts: 99
  • Karma: +25/-24
    • View Profile
Re: Spam Protection
« Reply #5 on: June 27, 2013, 06:21:53 pm »
I post this "script" for time when spam attack was actual. Now is no need to use this  ;)
« Last Edit: June 27, 2013, 07:58:59 pm by sasha19323 »

Yamaza

  • Newbie
  • *
  • Posts: 12
  • Karma: +2/-1
    • View Profile
Re: Spam Protection
« Reply #6 on: June 28, 2013, 02: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.

SugarD

  • Argonath RPG Dev/Manager
  • Tester
  • Sr. Member
  • ****
  • Posts: 820
  • Karma: +37/-75
  • STOP IN THE NAME OF THE COLESLAW!
    • View Profile
    • Clan Xperience
Re: Spam Protection
« Reply #7 on: July 08, 2013, 05: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

 

© Liberty Unleashed Team.