Author Topic: ID Logger (Logs players and name history)  (Read 1984 times)

This add-on logs the players that you meet in-game. Various information is recorded about these players such as their name history and when you last saw them.

You can find the log files in: config/client/logs/idlog

Current Features
  • Records name changes of players. (Also logs when each change was first seen)
  • Keeps track of the highest ID you've seen.
  • Allows you to search for players by name.

Console Commands
Code: [Select]
echo($IDLogger::HighestID); - Shows the highest recorded ID
$IDLogger::NoExport = 1; - Disables automatic exporting
echo(getFileCount("config/client/logs/idlog/ids/*")); - Shows the total number of players that you have logged (Only counts exported IDs)
echo(IDLogger_getTotalNameChanges()-getFileCount("config/client/logs/idlog/names/*")); - Shows the total number of name changes that you have logged (Only counts exported IDs)
IDLogger_Search("[i]Name[/i]"); - Searches the log files for the specified name. The name does not need to be complete or case-sensitive. It will show all matches in the console when the search is finished.
IDLogger_ViewStats([i]Blockland ID[/i]); - Shows information about the specified ID.
IDLogger_ViewNameHistory([i]Blockland ID[/i]); - Shows the name history for the specified ID.

To-Do/Upcoming Features
  • Playtime logging: your total playtime with each player will be recorded.
  • A GUI that will allow you to search for players and view all of the data in-game.
  • Import data from other ID loggers. (I may also add an option to export)
  • (Maybe) A server-sided version for dedicated servers.
  • (Maybe) Optionally send data to an ID lookup site. (If any of them still exist)

>>>Download<<<
>>>Download Updater<<<
« Last Edit: January 07, 2016, 04:40:03 PM by LakeYS »


I don't consider this "finished" because there's no GUI yet. Should I post it there anyway?

Active projects go in General Discussion.

Active projects go in General Discussion.
Isnt that more for servers?

I don't consider this "finished" because there's no GUI yet. Should I post it there anyway?
This doesn't mean it's unfinished if it is functioning.

Isnt that more for servers?
Not anymore. This has been made exclusively Modification Help.

Its still used as the old modification discussion board though

It isn't. Old topics simply haven't been moved. Can you lock this, please?

Active projects go in General Discussion.
Discuss Blockland and Torque Engine modification, scripting, modeling, etc

I don't think something like this belongs in General Discussion where the majority of people who hang out in GD aren't advance users and don't need things like this, GD is a safe place for projects that are aimed towards a more useable audience

This seems like a valid place to post this especially if you want suggestion and advice on your code

I'm leaning towards this being the modification help forum and all of the active mod progress threads being moved to general discussion. 

I'm leaning towards this being the modification help forum and all of the active mod progress threads being moved to general discussion.
If he wants these threads in General Discussion, I'm sure he would have moved them already.

Like Swollow said, this probably fits best in Modification Help. It isn't really usable for the average player, and I'm definitely looking for advice on the code.



Is "commandToServer('openPlayerList');" necessary for this code to work properly? It seemed to work fine without it but now I'm noticing issues.
Code: [Select]
function secureClientCmd_ClientDrop(%name,%rowID)
{
%text = NPL_List.getRowTextById(%rowID);
%id = getWord(%text,3+getWordCount(%text)-7);
IDLogger_PlaytimeEndID(%id);
Parent::secureClientCmd_ClientDrop(%name,%rowID);
}
« Last Edit: December 22, 2015, 03:06:33 PM by LakeYS »

Oh god what are you doing in the code...

Code: [Select]
function newPlayerListGui::update(%this, %cl, %name, %BL_ID, %trust, %admin, %score)
is all you need.

Also, disconnect is a client-sided function. It manages only you exiting the server.
« Last Edit: December 22, 2015, 07:15:40 PM by Dannu »

The code I posted is for playtime logging. The secureClientCmd_ClientDrop function is used to stop recording a player's playtime when they leave, and disconnect stops recording everyone's playtime when you disconnect. I've corrected the code and it appears to work fine.
Code: [Select]
function secureClientCmd_ClientDrop(%name,%rowID,%a,%b,%c,%d,%e,%f)
{
%text = NPL_List.getRowTextById(%rowID);
%id = getField(%text,3);
IDLogger_PlaytimeEndID(%id); //Tell the logger to stop recording this player's playtime.
Parent::secureClientCmd_ClientDrop(%name,%rowID,%a,%b,%c,%d,%e,%f);
}



I've updated the add-on. Playtime logging will be disabled until I can get it working correctly.
Quote from: 1.2.0 Changelog
  • Playtime logging is temporarily disabled due to bugs.
  • Fixed the LAN ID and blank log files being created. (These will be deleted automatically)
  • Added console command: IDLogger_Search("Name");
  • Added console command: IDLogger_ViewStats(Blockland ID);
  • Added console command: IDLogger_ViewNameHistory(Blockland ID);

Oh god what are you doing in the code...

Code: [Select]
function newPlayerListGui::update(%this, %cl, %name, %BL_ID, %trust, %admin, %score)
is all you need.

You can't use secure commands. Putting aside the fact doing it as shown above will work a whole lot better, afaik you can only call secure cmds within DSOs.