Author Topic: PHP Request: Global Ban List Administration  (Read 2399 times)

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
PHP Request: Global Ban List Administration
« on: December 22, 2005, 12:57:45 AM »
This should be fairly simple, so I thought I'd throw it out there in case anybody felt like contributing.  I need a basic PHP script to administer and display the global ban list.  It needs four parts:

Add:
- Some kind of authentication.  A simple password box right on the add page would work.
- Entry fields for: Name, IP, Reason, and number of days until the ban expires.

Remove:
- List with check boxes or something along those lines to allow for manual list removal.
- Also needs authentication, obviously.

Raw list:
- Lists IP's, 1 per line.  This is what the servers will download periodically.

Human-readable list / Wall of shame:
- This will be a publically-viewable list of names, IP's, reasons for banning, and time remaining until the ban expires.

It may not be a bad idea to make each part a separate php file in order to simplify the URL's.  I wouldn't bother with any database stuff, either.  A simple flat file should be sufficient (and likely much faster than database connections).  Keep it simple.

XtremeBain

  • Developer
  • Autococker
  • Posts: 1470
Re: PHP Request: Global Ban List Administration
« Reply #1 on: December 22, 2005, 02:19:52 AM »
Almost done, but it's too late to for me to start bug testing.  I'll try to finish it up tomorrow evening.
I've left the IPs in listip format for simplicity when using masks.  There's also some comments and a timestamp on each entry.  I just thought now that a reason message/code could be implemented so servers can display that message when players try connecting.  Just an afterthought mostly however.

PM me with your ideal method of delivery.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: PHP Request: Global Ban List Administration
« Reply #2 on: December 22, 2005, 02:35:51 PM »
Thanks, Bain.  No need to rush, though.  I won't be able to do anything with it until I get back after Christmas.

BSoD

  • Stingray
  • Posts: 51
Re: PHP Request: Global Ban List Administration
« Reply #3 on: December 22, 2005, 04:44:07 PM »
Finally a banning list, do I get to be first? :)

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: PHP Request: Global Ban List Administration
« Reply #4 on: January 04, 2006, 02:52:35 AM »
XtremeBain: Can you send me what you have so far when you get a chance?  I need to start working on the web end of this.

XtremeBain

  • Developer
  • Autococker
  • Posts: 1470
Re: PHP Request: Global Ban List Administration
« Reply #5 on: January 04, 2006, 01:33:57 PM »
I sent you a zip in the PM.
You'll be most interested in the dumpBans() initially to play with the output to the servers.
It is currently something like:
Code: [Select]
192.168.1.15
192.168.1.243
192.168.1.101
X

The dump is accessible by going to /index.php?list otherwise all the other functions are available at /index.php

Depending on the server configuration, the .dat will have to be CHMOD'd to 664 and you can .htaccess the .dat in case you don't want people reading the comments, etc.

Let me know if you'd like to see any adjustments, or if you notice any problems.  I only did minimal testing to ensure functionality.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: PHP Request: Global Ban List Administration
« Reply #6 on: January 04, 2006, 03:32:12 PM »
Cool, thanks.  I'll work on it tonight.

KnacK

  • Global Moderator
  • Autococker
  • Posts: 3039
Re: PHP Request: Global Ban List Administration
« Reply #7 on: January 18, 2006, 08:27:19 AM »
OK,

we need some checks and balances here.  I suggest that a line be added so we know WHO banned WHO for WHAT reason.

Also, maybe an additional field pointing to a forum entry or a demo file on a server so that there is trace evidence of disobedience.