Anti Bot


Author: TheRealKeith
Created: 2014-06-28T02:08:28-0400
Edited: 2014-06-28T02:08:28-0400
Denizen Version: Build 1474
Views: 1
Downloads: 810
Likes: 0


WGET
Description: This occurs more on servers in offline mode, but can occur on normal servers. Bots attack your server causing heavy load, lots of spam, and they're coming too fast to ban them. This simple script will count your players as they join, and if more than 5 players join in under 1 minute, the whitelist will automatically activate itself. After 30 minutes, the whitelist will automatically turn back off incase you forget about it or weren't online during the attack.

The amount of players and times to activate and deactivate whitelist are configurable.

Whitelist:
  type: world
  debug: false
  events:
    on player joins:
    - if <server.list.players> !contains <player> {
      - flag server newplayer:++ duration:1m
      }
    - if <server.flag[newplayer]> > 5 {
      - execute as_server 'whitelist on'
      - run WhitelistToggle delay:30m
      }

WhitelistToggle:
  type: task
  debug: false
  script:
    - execute as_server 'whitelist off'




Comments
No one has posted a comment! Post one below: