Bans.TXT format?

Host your own server and communicate with server operators.
4 posts Page 1 of 1 First unread post
MuffinTastic
3 Years of Ace of Spades
3 Years of Ace of Spades
Posts: 63
Joined: Tue Sep 03, 2013 4:20 am


So, I am attempting to make a PHP ban checker that allows admins to enter part of a name and retrieve a number of banned usernames and IP addresses.

I already have most of the script down, such as retrieval of names and ip addresses, JSON parsing, etc etc.But I am confused about the 4th item in the ban array items in bans.txt.

Is it a timestamp? Ban duration?
Code: Select all
["CAMILLY_SANTOS", "---.--.--.--", ": Aimbot | 11/8/13 | Muffin", null],
It seems to be "null" when it is a permaban.

If it is duration, it's very imprecise. These two are votekick bans, and while the ban duration on votekicks is always 30 minutes flat, this shows some deviation for no reason --
Code: Select all
["[zFake]lFake", "--.--.--.---", ": he has hack belive me", 1379709630.893699]
["MysticBudder", "---.--.--.--", ": griefer", 1382047617.845142]
So, basically..
I don't get it
ReubenMcHawk
Organizer
Organizer
Posts: 853
Joined: Sat Nov 03, 2012 4:36 am


Yeah, that number is a Unix timestamp for when to remove the ban.
TheKing
League Champs
League Champs
Posts: 315
Joined: Mon Apr 22, 2013 3:43 pm


I really do not know how to help you with that, but you can use script "banlog" that does a ban like this.
Code: Select all
{'duration': 30, 'ip': (u'xxx.xx.xx.xxx'), 'reason': u': Wallhack',  'name': '[.OSP.]Zandor', 'time': '01/05/14 | 15:45:01}
"none" for Permban. This can help you in control of bans, I have a banlog edited with add 'By:' if you want.
Banlogscript - http://paste.quacknet.org/view/b5531b67
ReubenMcHawk
Organizer
Organizer
Posts: 853
Joined: Sat Nov 03, 2012 4:36 am


That script seems like it's a bigger hassle than otherwise, since Unix time isn't dependent on timezones.
4 posts Page 1 of 1 First unread post
Return to “Servers”

Who is online

Users browsing this forum: No registered users and 15 guests