Server Log File - detect a griefer?!

General discussion about Life is Feudal MMO and Life is Feudal: Your Own, The main section and backbone of the forums.

Mighty7788
 
Posts: 6
Joined: 27 Oct 2014, 19:03

Server Log File - detect a griefer?!

Post by Mighty7788 » 27 Oct 2014, 19:06

Hey Guys,

ive an own LiF Server and we got some Griefer-Problems.

Is there a way to detect them by reading the giant log-file?
Would be nice to get them .... :-)


Greetings
Mighty


Computermancer
 
Posts: 1
Joined: 29 Oct 2014, 06:30

Re: Server Log File - detect a griefer?!

Post by Computermancer » 03 Nov 2014, 21:26

I would like to know as well. So far, I can only find when someone deconstructs, but not WHO did it or WHO WAS ON at the time.

I can find when players check the player list, it shows time and accountID.

I would love it if we could find out who initiated what actions.


Reaganomicon
 
Posts: 30
Joined: 22 Jul 2014, 10:43

Re: Server Log File - detect a griefer?!

Post by Reaganomicon » 04 Nov 2014, 14:09

Computermancer wrote:I would like to know as well. So far, I can only find when someone deconstructs, but not WHO did it or WHO WAS ON at the time.

I can find when players check the player list, it shows time and accountID.

I would love it if we could find out who initiated what actions.


It's hacky, but deconstruction is done by calling p_deleteUnmovableObject, so you could modify it make a note of who was in the area before actually going through with the deletion. You'll probably need baron.cs if you want accurate realtime positions, though.

Another crude method involves watching for
Code: Select all
<NOSCOPE> ServerManager::_registerPerform(), ability=Deconstruct (181)

to pop up, because it should be followed by something among the lines of

Code: Select all
<NOSCOPE> sending ObjEffectsEvent, action=3 over ch_3 [1793] - 1

several milliseconds later.
The 1793 here is the unique ID of the connection hopefully belonging to the culprit. The crudeness comes from the fact that you can't really be sure unless you verify by location as well. The ID also becomes useless once the client disconnects, as it will get recycled, most likely for another player.
ch_3 appears to be the character ID, but I've had strange inconsistencies with it during testing a while back and never really had the chance to confirm if it was me messing up or if it's something else entirely. If this is indeed the charid, then 90% of your job is done.

The correct approach is to bug devs until they write something proper. :)


MH6
 
Posts: 29
Joined: 22 Sep 2014, 14:59

Re: Server Log File - detect a griefer?!

Post by MH6 » 07 Nov 2014, 03:34

Reaganomicon wrote:It's hacky, but deconstruction is done by calling p_deleteUnmovableObject, so you could modify it make a note of who was in the area before actually going through with the deletion. You'll probably need baron.cs if you want accurate realtime positions, though.


I've done this on my server. It's not perfect but it works. Basically I added two functions (f_baron_deleted_umovable and f_baron_deleted_movable) which are then called in the f_deleteUnmovableObject and f_deleteMovableObject procedures. If you only care about unmovable objects (buildings) you can obviously discard the movableObject bits.

This grabs the object type and the current time and adds a new record to baron_deletelog. This gives me all of the deletion events that have occurred, like so:
Image

It then grabs all the current players (via baron.cs) in the baron_players table and stores them with a reference to the log (deletion) event in baron_deletelog_players. Which I can then look at to see who was playing at the time the object was deleted. Then I can just do a simple distance calculation to see who was closest to the object that was deleted, and they'll pretty much always be the culprit. I don't do the distance calculations in SQL though, as I have my own utility for that. But I'm sure someone can add that functionality to the SQL procedures. It'd probably be better that way as then you can store only the closest player and save some storage space.

You can download and run the SQL file to generate these procedures/tables at http://pastebin.com/J8nmhHMD. You will also need to modify p_deleteMovableObject and p_deleteUnmovableObject procedures to look like this: http://pastebin.com/91YSPs58. Note the 'CALL' statement before the transaction.

You will also need baron.cs, so follow the instructions here: http://lifeisfeudal.com/forum/lif-baron-script-get-all-currently-active-players-t3364/

Not the greatest way to do this, but it works--and it should suffice until the developers add better logging features.


Reaganomicon
 
Posts: 30
Joined: 22 Jul 2014, 10:43

Re: Server Log File - detect a griefer?!

Post by Reaganomicon » 07 Nov 2014, 05:33

What's your approach to getting distances? SQL has a stored procedure called f_fromGeoID for decomposing geoID into terID and the x/y coords, but I have to idea how to elegantly call it inside a query.

Honestly, it would be a lot easier if we could just pull the info out of... ServerManager? Surely that's not what actually tracks ability usage, but it's also not the control object, so I'm at a bit of a loss.

Return to General Discussion