Page 1 of 1

Bans.TXT format?

Posted: Sun May 04, 2014 10:12 am
by MuffinTastic
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

Re: Bans.TXT format?

Posted: Sun May 04, 2014 10:19 am
by ReubenMcHawk
Yeah, that number is a Unix timestamp for when to remove the ban.

Re: Bans.TXT format?

Posted: Sun May 04, 2014 10:04 pm
by TheKing
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

Re: Bans.TXT format?

Posted: Mon May 05, 2014 8:15 am
by ReubenMcHawk
That script seems like it's a bigger hassle than otherwise, since Unix time isn't dependent on timezones.