Author Topic: BANLIST.txt format[Solved]  (Read 2212 times)

uh, what happened up there? it looks like it banned bl_id -1 for %i amount of time?


did you modify the command? that's cool, just wondering thoughthis adds up. why do you get a different number though?
the -1 is the banner ID, not the banned ID

Seeing as console doesn't have an ID it sets it to -1

The whole time thing is still blowing my mind, any further explanations and/or formulas to get the number from a ban minute
« Last Edit: October 07, 2012, 12:34:48 AM by ¥ola »

the -1 is the banner ID, not the banned ID

Seeing as console doesn't have an ID it sets it to -1

The whole time thing is still blowing my mind, any further explanations and/or formulas to get the number from a ban minute
Okay, so, today is the sixth of October.

That's 279 days into the year.

279 * 24 * 60 = 401760, and it's almost tomorrow (or maybe tomorrow in your time zone.), so let's go ahead and say 280, so 403200.

Looks very similar to your values, doesn't it?

It probably uses the server's getRealTime at whatever time it needs to compare this to.

Okay, so, today is the sixth of October.

That's 279 days into the year.

279 * 24 * 60 = 401760, and it's almost tomorrow (or maybe tomorrow in your time zone.), so let's go ahead and say 280, so 403200.

Looks very similar to your values, doesn't it?

It probably uses the server's getRealTime at whatever time it needs to compare this to.
Oh my god.
Wow.

Thanks, lol, all this hard thinking and researching for such an easy thing.

There is one problem with that, though.

which is

how are permanent bans recognized?

There is one problem with that, though.

which is

how are permanent bans recognized?
-1

CONSOLE   -1   Epøst   6080      AUTOBAN- ABUSE OF THE /SETNAME FUNCTION (CURSING) (you have no reason for that, srsly)   12   368076

pulled that from bluzone logs.
this calculates to.. 255 days into the year.

that's uh
approximately 8 months into the year, going by 30 days to a month. it's the most recent ban with a date. 8 months is august sometime. sounds about right.



conclusion: this is the time (in minutes) when the user will be unbanned, starting from january first of the year defined in the previous field.
There is one problem with that, though.

which is

how are permanent bans recognized?
I'm looking at a 600+ lines long ban list of perma bans from the bluzone.

they all register as -1\t-1

-1
9   235407

earliest ban in my list. i'm pretty sure that ban was permanent.

maybe it wasn't and bans just aren't removed from the list? that's probably a dumb idea, but there are -1s in there

if it just subtracts one, then how does it recognize if a ban has passed yet? i'm pretty sure it doesn't constantly check

Okay guys.

Now that I've wasted ~2 hours figuring THAT out my brain is fuzzled to hell.

Can either of you quickly write a formula to get the number when %input is what the time is in minutes

Such as

%time = 60
ban time = 60 minutes
Can you write something to get the BANLIST number right quick, if not I guess I'll do it tomorrow.

9   235407

earliest ban in my list. i'm pretty sure that ban was permanent.

maybe it wasn't and bans just aren't removed from the list? that's probably a dumb idea, but there are -1s in there

if it just subtracts one, then how does it recognize if a ban has passed yet? i'm pretty sure it doesn't constantly check

Quote from: BANLIST.txt
JazZ   35157   eagle517   25351   173.27.253.65   test   -1   -1

That is the format of a permaban, thanks to my trusty helper

Also
I figure the way it works is when a client joins it checks if the ban time has been passed, if so connection is accepted, if not then not.
It doesn't physically erase the ban unless you use RTB and clear all bans manually.

It doesn't physically erase the ban unless you use RTB and clear all bans manually.
k that explains it

although i was just able to problemsolve that out by actually opening the game

k that explains it

although i was just able to problemsolve that out by actually opening the game
Lol

Another nooby question just because I'm total noob

What is the format return of getRealTime() and getSimTime()
As in what exactly do they return?

Lol

Another nooby question just because I'm total noob

What is the format return of getRealTime() and getSimTime()
As in what exactly do they return?
getRealTime() returns the time in milliseconds
getSimTime() returns the sim time in milliseconds

i thought getRealTime returned something like 5/7/13 15:32:40 but i was wrong on that, getDateTime() does that.

also, i just found a function: getDayOfYear(month, day).

not sure if it's default or not, but that could be useful.
« Last Edit: October 07, 2012, 12:47:43 AM by otto-san »

getRealTime() returns the time in milliseconds
getSimTime() returns the sim time in milliseconds

i thought getRealTime returned something like 5/7/13 15:32:40 but i was wrong on that

also, i just found a function: getDayOfYear(month, day).

not sure if it's default or not, but that could be useful.
It's amazingly helpful.
it is default btw and returns of course the day of the year

Something like this should work for calculating ban time relative to the current date:

Code: [Select]
function getMinuteThing()
{
%datetime = getDateTime();
%month = getSubStr(%datetime, 0, 2);
%day = getSubStr(%datetime, 3, 2);
%time = getWord(%datetime, 1);
%hours = getSubStr(%time, 0, 2);
%minutes = getSubStr(%time, 3, 2);
return (getDayOfYear(%month, %day) * 24 * 60) + (%hours * 60) + %minutes;
}

function getBanTimeThing(%time)
{
%year = getSubStr(getDateTime(), 6, 2);
%min = getMinuteThing();
%min2 = %min + %time;
if(%min2 > 525600)
{
%min2 -= 525600;
%year++;
}
return %year TAB %min2;
}

Tested it a few times, seems to work fine.

So wait.
Apparently if you write something to BANLIST.txt it doesn't do anything?

I'm writing it the EXACT same as when I use the ban on RTB

the lines literally have no difference yet one shows up in RTB (The one using rtb's button obviously), and prevents the player from joining

However when I writeLine on the file it doesn't do anything.

Am I missing something?