Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ban Manager
08-01-2012, 10:27 AM, (This post was last modified: 03-30-2014, 08:21 PM by {DO}Rigel.)
Post: #1
Ban Manager
Edit: I will keep the download link in this post and update the version number as needed. To alert a new version I will always add a post to the end of the thread advising a new version has been added. Download it here: Ban Manager v1.0.4b

I've been working on a BanManager utility to enhance the banning capabilities of server administrators:
  • Separate CallVote KickBan and RCon bans from Admin Bans
  • Set ban expiration dates
  • Save the Player Name (in addition to the IP)
  • Set a reason for the ban
  • Maintain a common banlist across multiple servers
  • Fully automate banlist updates on all servers
  • Keep the active banlist on each server current without restarting the server
I now have a fully configurable working prototype written in TCL. It requires the TCL FTP and UDP packages be installed. It does send RCon commands to the server, so FTP and RCon access to the server is required. Currently it has only been tested in Linux, but should work in Windows.

Here is some sample output:
Code:
Initializing Ban Manager...

1. Retreiving ban data from game servers
    Current Server: DO1 50.97.113.64:27910
    Reseting official bans
        execing aa_banlist_x.cfg
        Writing arena/listip.cfg.
    Retrieving new bans

    Current Server: DO2 69.9.166.166:27910
    Reseting official bans
        execing aa_banlist_x.cfg
        Writing arena/listip.cfg.
    Retrieving new bans

    Current Server: DO3 85.17.208.104:27910
    Reseting official bans
        execing aa_banlist_x.cfg
        Writing arena/listip.cfg.
    Retrieving new bans

    Current Server: DO4 208.100.0.132:27910
    Reseting official bans
        execing aa_banlist_x.cfg
        Writing arena/listip.cfg.
    Retrieving new bans

    Current Server: DO5 50.23.91.149:27910
    Reseting official bans
        execing aa_banlist_x.cfg
        Writing arena/listip.cfg.
    Retrieving new bans


2. Updating ban data
    No new ban data found

3. Updating the servers
    Current Server: DO1 50.97.113.64:27910
    Uploading configs
    Initializing banlist
        execing listip.cfg
    DO1 current

    Current Server: DO2 69.9.166.166:27910
    Uploading configs
    Initializing banlist
        execing listip.cfg
    DO2 current

    Current Server: DO3 85.17.208.104:27910
    Uploading configs
    Initializing banlist
        execing listip.cfg
    DO3 current

    Current Server: DO4 208.100.0.132:27910
    Uploading configs
    Initializing banlist
        execing listip.cfg
    DO4 current

    Current Server: DO5 50.23.91.149:27910
    Uploading configs
    Initializing banlist
        execing listip.cfg
    DO5 current

Process Complete

I'm going to run it a for a while on my servers, but very soon I should have a beta version available for you to try. Please post and let me know what you think Smile

Rigel

Edit: Updated version number
[Image: dorig.png](Art by {OS}Drastic)
system specs in profile
Reply
08-01-2012, 12:07 PM,
Post: #2
RE: Ban Manager 1.0.1
This is a terrific idea!
Reply
08-01-2012, 05:48 PM,
Post: #3
RE: Ban Manager 1.0.1
sounds very good
good job if it works as it should Smile
will it 'only' write/read files via ftp or will it also be able to write/read them on a local system? (for those who hosts server from home)
[Image: 1mj8I8vrcsu7.png]
________________________________________________
If you want to touch the sky - f*ck a duck and try to fly!
Reply
08-01-2012, 07:24 PM,
Post: #4
RE: Ban Manager 1.0.1
I will add support for local servers. Good idea. Idea

Cool In the mean time, on a local server managing bans manually is much easier because all you have to do is edit the listip.cfg. You can even store dates, names and reasons with comments:

sv addip 66.6.666.60 // 2012.7.1 - 2012.7.4 (3 day ban): {DO}Rigel - Constant camping, bad sportsmanship, foul language, and team sabotage!
[Image: dorig.png](Art by {OS}Drastic)
system specs in profile
Reply
08-04-2012, 04:03 AM,
Post: #5
RE: Ban Manager 1.0.1
Ok, I'm almost finished. I have added support for local servers, but in a work-around sort of way. You set the FTP username and password to local server. Here is what I mean:

FTP User ID: local
FTP PW: server

This is set in the server file whose format will be discussed in the README. For servers set to "local" and "server" it will use a local copy instead of FTP. RCon access is still required.

I abandoned player names and reasons in favor of a more simple Ban Info field. In it you can store anything, including player name and reason. It simply appears as a comment in the listip.cfg. One for each ban, any length (within reason).

I also added an expired ban archive file. When a ban expires, it is not deleted. Instead it is moved to an archive (in case you ever need to remember it or the IP).

A Ban can be added using 2 required fields; expiration and IP (ban info is optional). Bans can be removed with an index number or the IP, or a text match (in other words a glob search of any characters in the ban line).

Bans can be managed via the command line or by editing the master ban list file with a text editor. The server file is managed with a text editor only.

Next I will start working on the README, which will be a lot more detailed. I expect to post the beta before Monday Smile
[Image: dorig.png](Art by {OS}Drastic)
system specs in profile
Reply
03-04-2014, 01:12 PM, (This post was last modified: 03-26-2014, 07:39 AM by {DO}Rigel.)
Post: #6
RE: Ban Manager 1.0.1
After all this time I finally have something you can try. Its been working pretty well for me for about 2 years now because I can live with a few of the problems I know about. For example, if you have the historical backup feature turned on, it will sometimes save a copy even though nothing has changed. Confused

I'm quite certain there are going to be other problems at first. Use at your own risk! It's worked great for me, but I'm just one person testing on the same machine everyday. I have never tried it in Windows at all! I have no idea what TCL looks like on a Windows box. Huh

This script requires the following (see the README):
TCL 8.5 or later
The TCL UDP package
The TCL FTP package (likely this will come with TCL itself)

There is a pretty complete README file included. I've whipped my way through some sections and yet it is still quite long. Good news, you don't have to read all of it! You will want to make sure you completely read from the top until you get to a note saying you don't have to read the rest. This is a simple tool to use, but it can seem complicated if you don't know what its doing or how it does it. Rolleyes

If you have troubles just let me know, we'll just have to tackle them one at a time. I hope this works for you I've spent way too much time on it, but I find I can't live without it myself so its long over due for everyone else.

At long last... here it is: Edit: Download link moved to the 1st post Tongue Big Grin Cool
[Image: dorig.png](Art by {OS}Drastic)
system specs in profile
Reply
03-26-2014, 07:49 AM,
Post: #7
RE: Ban Manager
There was potential for problems that could be caused by:

* Bad rcon password, IP or Port #
* Frozen/non-responsive game server
* Invalid FTP credentials
* FTP service unavailable

I've added some additional code to better test rcon and FTP, and more gracefully handle these problems.

* The link will be kept in the first post of this thread along with the current version number (which I have taken out of the thread title).

We are now on version 1.0.2b - grab it from the link in the first post. Only the aaban.tcl file has changed.
[Image: dorig.png](Art by {OS}Drastic)
system specs in profile
Reply
03-30-2014, 08:21 PM, (This post was last modified: 03-30-2014, 08:23 PM by {DO}Rigel.)
Post: #8
RE: Ban Manager
More fixes and upgrades. Download the latest version these are important changes!

Version 1.0.4b
* Fixed bug in rcon test
* Fixed bug: attempting upload to servers failing rcon or ftp test
* Removed FTP download of new bans in favor of saving rcon results to a list
* proc Output: Removed nested self-looping, added result return
* Fixed backup file append bug (would repeatedly backups with no changes)

Next:
I think I can remove the need for FTP access entirely
* Loop rcon to add or remove bans using the local listip.cfg
* Use sv writeip to keep valid listip.cfg on the server for restarts
* Test for valid FTP access, if not use rcon instead

The current version is a very usable state now. That's the last of the known bugs - if these fixes actually work. I need beta testers to provide feedback.
[Image: dorig.png](Art by {OS}Drastic)
system specs in profile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)