Git Product home page Git Product logo

bfp4f-limiter's Introduction

bfp4f-limiter

Battlefield Play4Free limiter script based on bfp4f-rcon class.

Requirements

  • PHP Interpreter
  • Database (Script supports 2 types of DB)
    • MySQL, PostgreSQL or other database possible to connect via PDO.
    • ... or MongoDB (You need to install ext-mongo for PHP)

Optional

  • Webserver (if you would like to run it continuously via web-browser instead of running in console/cmd/terminal)

Installation

You may install bfp4f-limiter in two different ways. With Composer (package dependency manager for php) or just manually.

Installtion guide was made for Windows OS. It may be also reproduced on LAMP or MAMP easily. If you have installed or you owned already webserver with php you may skip first 2 steps.

Manual Installation

  1. Download EasyPHP (php development) or other webserver with php interperter and mysql database (googlit: wamp php mysql).
  2. Install it.
  3. Download bfp4f-rcon ("Download .zip" button on right sidebar). Extract it.
  4. Download bfp4f-limiter from stable branch ("Download .zip" button on right sidebar). Extract it.
  5. Merge it to one folder.
├── composer.json
├── DB-mongo.php
├── DB-pdosql.php
├── limiter-browser.php
├── limiter-config.php
├── limiter-console.php
├── limiter-script.php
├── limiter.sql
├── loop-limiter.sh
└── src
    └── T4G
        └── BFP4F
            └── Rcon
                ├── Base.php
                ├── Chat.php
                ├── Players.php
                ├── Server.php
                ├── Stats.php
                └── Support.php
  1. Open limiter-config.php in your text/code editor.
  2. Comment (add two slashes //) at the beginnig of the line 29
  3. Uncomment (delete two slashes) on lines 31-35.
  4. Configure connection to database on lines 39-45. Password is supposed to be empty as default on many WAMPs. If you are sure (googlit) you don't have password to your mysql database leave "" as no password.
  5. Configure RCON conection
  6. Open phpmyadmin (look for it in easyphp's tray menu).
  7. Create new database called "limiter".
  8. Enter this database.
  9. Import "limiter.sql" (Tab called import > upload .sql).
  10. Move this directory to your ProgramFiles/EasyPHP/htdocs (web) folder.
  11. Start Apache and MySQL services .
  12. Run it in browser typing http://localhost/limiter-browser.php.

Installation finished. Now look up for configuration.

===

Configuration

In limiter-config.php you have very long list what you could change and configure it as you prefer.

Please notice that mm_iga/mm_kicker has usually predefined default kick message (usually it is piqus you are being kicked (reason: Unknown)). Each kick message in limiter-config.php will only replace word Unknown.

===

Run

You may run script continously running via browser or terminal. There are some webhostings which allows to run CRON script minutely, also this method is supported and recomended.

Running via browser. If you installed completely limiter script you may type in address bar http://localhost/path/to/limiter-browser.php

Running via console is much easier if you have ever used it to run php scripts. If you have exported to $PATH (System Env. Variable) location to your php(.exe) binary you may enter folder where you have installed limiter then execute php limiter-console.php or sh loop-limiter.sh in terminal/console/cmd.exe/powershell. You don't have to export this variable. You could just type "global" path to php(.exe) i.e C:/ProgramFiles/PHP/5.4/php.exe C:/Users/Admin/Webdocs/bfp4f-limiter/limiter-console.php.

It is worth noting that sh command is not supported out of the box in Windows OS. You could install GIT Bash (Mingw) form http://git-scm.com/ which includes many useful commands like sh, ssh over openssh, grep, find, git etc. etc.

===

Composer

Project has been added to Packagist. You may invoke composer create-project piqus/bfp4f-limiter:dev-stable


Contribution

Feel free to modify code. Each patch is moderated so don't be shy and share your idea! ;-)

bfp4f-limiter's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.