Jump to content
  • 0

Tracking player name changes...


PetuniaEpoch

Question

Hey all, 

 

Does anyone know of a way to track players who change their names?

 

I've thought about rcon tools etc, but I really want to make players in-game name changes viewable to the public, on our website.

 

I can query our gameserver database no probs, but not sure how to go about tracking name changes, as on each login, it obviously overwrites the player_data table.

 

I can add a new table to the database etc if needed, just not sure how to store names at logins, cross check against PlayerUID, and then show all names from any give PlayerUID :(

 

Anyone done this and have a solution?

 

I don't want to reveal players UID's to the public, but do want to list all alt-versions of a players name :S

 

Any ideas?

Link to comment
Share on other sites

Recommended Posts

  • 0

Actually it is not that hard to keep track of player name changes, I am working on a general logging tool for DayZ at the moment where you will be able to see the full player history over time (gear, position, humanity, everything if you want) and possibly vehicle history too (it's the same but more data maybe). It can be used to identify hackers or just look at humanity changes over weeks or whatever you can think of doing with that data.. There is no public release date yet but it would be easy to add player name changes too and I've looked and didnt found any tool that would do something like that!?

Link to comment
Share on other sites

  • 0

Actually it is not that hard to keep track of player name changes, I am working on a general logging tool for DayZ at the moment where you will be able to see the full player history over time (gear, position, humanity, everything if you want) and possibly vehicle history too (it's the same but more data maybe). It can be used to identify hackers or just look at humanity changes over weeks or whatever you can think of doing with that data.. There is no public release date yet but it would be easy to add player name changes too and I've looked and didnt found any tool that would do something like that!?

 

Well get on it then and get a public release date :D

Link to comment
Share on other sites

  • 0

Hey :)

 

I'd say my SQL and PHP level is basic (know basic PHP, and do SQL queries etc)...

 

So, would that be something like a trigger so that when the PlayerName field of the player_data table changes, writing that change to another table so that it can be pulled via PHP into a HTML table, or have I just completely over simplified it? :S

 

Any advice would be super-cool :D

 

i think this can be don with an mysql trigger and a new felt in the player_data

Link to comment
Share on other sites

  • 0

Heeyyyyy - that sounds awesome!

 

Don't supposed it'd be PHP base so could be hosted on a Linux server? :D

 

What I'm after, is making some basic info public - like name changes (as one of our players recently said:

 


"During a zombie apocalypse, you can't expect to rob someone blind with the name "George" then turn up at dawn the next day as "Rob" to demand for help"

 

:D

 

Although even if it was a private tool for admins, that'd be cool too!

 

Let me know when you have an update? :D

 

 

Actually it is not that hard to keep track of player name changes, I am working on a general logging tool for DayZ at the moment where you will be able to see the full player history over time (gear, position, humanity, everything if you want) and possibly vehicle history too (it's the same but more data maybe). It can be used to identify hackers or just look at humanity changes over weeks or whatever you can think of doing with that data.. There is no public release date yet but it would be easy to add player name changes too and I've looked and didnt found any tool that would do something like that!?

Link to comment
Share on other sites

  • 0

In fact, that tool sounds awesome! :D

 

Please do let me know when it comes out!

 

Actually it is not that hard to keep track of player name changes, I am working on a general logging tool for DayZ at the moment where you will be able to see the full player history over time (gear, position, humanity, everything if you want) and possibly vehicle history too (it's the same but more data maybe). It can be used to identify hackers or just look at humanity changes over weeks or whatever you can think of doing with that data.. There is no public release date yet but it would be easy to add player name changes too and I've looked and didnt found any tool that would do something like that!?

Link to comment
Share on other sites

  • 0

 First Create the DB


CREATE TABLE IF NOT EXISTS `player_alias` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uid` varchar(255) DEFAULT NULL,
  `PlayerNames` text,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uid` (`uid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;

Then add this trigger

DELIMITER ;
DROP TRIGGER IF EXISTS `updateName`;
DELIMITER //
CREATE TRIGGER `updateName`
AFTER UPDATE ON player_data
FOR EACH ROW
BEGIN
	#IF (NEW.PlayerName IS NULL OR NEW.PlayerName = '' OR NEW.PlayerName = OLD.PlayerName) THEN
	IF (SELECT EXISTS(SELECT uid FROM player_alias WHERE `uid` =  NEW.PlayerUID))  THEN   
		UPDATE player_alias SET PlayerNames = CONCAT_WS(',',PlayerNames,NEW.PlayerName) WHERE uid = NEW.PlayerUID;
	ELSE
		INSERT INTO player_alias (uid, PlayerNames) VALUES (NEW.PlayerUID,NEW.PlayerName);
	END IF;
END//
DELIMITER ;
Link to comment
Share on other sites

  • 0

Hey, thanks!!!

 

I'll try that later today on the test server :)

 

 

 

 First Create the DB


CREATE TABLE IF NOT EXISTS `player_alias` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uid` varchar(255) DEFAULT NULL,
  `PlayerNames` text,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uid` (`uid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;

Then add this trigger

DELIMITER ;
DROP TRIGGER IF EXISTS `updateName`;
DELIMITER //
CREATE TRIGGER `updateName`
AFTER UPDATE ON player_data
FOR EACH ROW
BEGIN
	#IF (NEW.PlayerName IS NULL OR NEW.PlayerName = '' OR NEW.PlayerName = OLD.PlayerName) THEN
	IF (SELECT EXISTS(SELECT uid FROM player_alias WHERE `uid` =  NEW.PlayerUID))  THEN   
		UPDATE player_alias SET PlayerNames = CONCAT_WS(',',PlayerNames,NEW.PlayerName) WHERE uid = NEW.PlayerUID;
	ELSE
		INSERT INTO player_alias (uid, PlayerNames) VALUES (NEW.PlayerUID,NEW.PlayerName);
	END IF;
END//
DELIMITER ;
Link to comment
Share on other sites

  • 0

 

 First Create the DB


CREATE TABLE IF NOT EXISTS `player_alias` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uid` varchar(255) DEFAULT NULL,
  `PlayerNames` text,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uid` (`uid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;

Then add this trigger

DELIMITER ;
DROP TRIGGER IF EXISTS `updateName`;
DELIMITER //
CREATE TRIGGER `updateName`
AFTER UPDATE ON player_data
FOR EACH ROW
BEGIN
	#IF (NEW.PlayerName IS NULL OR NEW.PlayerName = '' OR NEW.PlayerName = OLD.PlayerName) THEN
	IF (SELECT EXISTS(SELECT uid FROM player_alias WHERE `uid` =  NEW.PlayerUID))  THEN   
		UPDATE player_alias SET PlayerNames = CONCAT_WS(',',PlayerNames,NEW.PlayerName) WHERE uid = NEW.PlayerUID;
	ELSE
		INSERT INTO player_alias (uid, PlayerNames) VALUES (NEW.PlayerUID,NEW.PlayerName);
	END IF;
END//
DELIMITER ;

Thanks Itsatrap! this is exactly what I needed too! This saves tonnes of time wading through logs to look for players who may have had a warning for something and simply bypassed any further punishment by changing their name.

 

From my perspective, there are two things that would make this even better....

 

1/ Show the original alias the player had changed from?

Currently when a new row is created, the contents tell you the new alias the player is using which, is also the indication that they had a different name before. But, to find out what the original alias was you still need to search back through log files. Could both aliases (old & new) be added to the row when it is created?

 

2/ Each row only shows each alias used once? 

Currently, if a player toggles between two aliases, the same aliases keep being appended to the row. I think it would be better if in this example it only showed the 2 aliases and only added another if it was a new alias. I'm only keen to know who is who not, when they have been who...if that makes sense :)

 

I would be grateful if you could let me know if this can be done and if you could post some new SQL to amend the existing I have already loaded above.

 

Again, superb SQL.Thanks very much!  :D

Link to comment
Share on other sites

  • 0

Due to the way any player can change their name to more or less anything you may get issues of a player changing their name to appear to be another player or just two players who happen to have chosen the same name (one good and one causing issues).

 

Would be better if there were a PHP utility that could allow admins to update the trigger populated table with 'notes" so you could take bans etc to a name at the time and tne report on the playerUIDs with notes to make sure you have the right playerUID of the idiot rather than the good buy...

 

Could end up with a player CIM system ;)

Link to comment
Share on other sites

  • 0

 

Hi Rimblock, not sure I understand your post as the SQL provided above does track the player's aliases against the PID's.....

 

id uid PlayerNames

4 125xxx782 Zexxxay,Mxxxge

 
This is what it creates in the new Player alias table.....

 

ReDBaroN,

If I understand correctly, UID is a unique field meaning the above modification will not get 'confused' even if two players take each other's playernames. Is that right?

If that's so this might be a good add-on for any Epoch server. Would it be taxing on the SQL server though... Any idea how much strain would it put on the server?

Link to comment
Share on other sites

  • 0

mgm, bang on! It's a fantastic addition to any server imo.

 

Just hopefully could be made even better if the functions in my post above could be added....

 

Sorry, missed the other question you asked, hence my edit....

 

It doesn't appear to taxing my server at all. It only logs where players change their names so, in 2 weeks I have been running it, the table stands at 24 rows with the 4 columns above.

Link to comment
Share on other sites

  • 0

Hi Rimblock, not sure I understand your post as the SQL provided above does track the player's aliases against the PID's.....

id uid PlayerNames

4 125xxx782 Zexxxay,Mxxxge

This is what it creates in the new Player alias table.....

Someone logs on to the server called "Awesome". They do something bad and get a warning. Over the next month 3 other players join at different times and all call themselves "Awesome" (amongst other players). At the beginning of the 2nd month, a player called "awesome" does something bad. How to tell if it was the the person using the name awesome who was already warned or one of the other 3 awesome without additional records ?.

The point being that multiple people can use the same name so how to tell which one has the warning X months down the line without something to link them to the warning.

Link to comment
Share on other sites

  • 0

Thanks Rimblock, now I understand.

 

When I warn a player about anything I normally note their PID separately and ask my admins to do the same. This is normally dupers where we warn for the first offence and delete their items in storage down to 5 of everything except only 2 bc's and perm ban for repeated offence.

 

This is slightly different. If a player comes in and dupes again after a warning, they will most likely be using a different alias. thanks to this superb SQL above, I can now quickly look in that table to see if its the same player using a new identity as it links all their aliases by PID.

Link to comment
Share on other sites

  • 0

Thanks Rimblock, now I understand.

 

When I warn a player about anything I normally note their PID separately and ask my admins to do the same. This is normally dupers where we warn for the first offence and delete their items in storage down to 5 of everything except only 2 bc's and perm ban for repeated offence.

 

This is slightly different. If a player comes in and dupes again after a warning, they will most likely be using a different alias. thanks to this superb SQL above, I can now quickly look in that table to see if its the same player using a new identity as it links all their aliases by PID.

 

Firstly, just to make it clear, the trigger sql is great and I will probably look to be using it with a few small modifications.  I don't want people to think I don't think this is a good idea, I do.

 

One part from your reply that puzzles me though. 

 

If you are already logging playerUIDs that have been given infractions, why do you care about player names ?.  Surely having an infractions table in the DB with playerUIDs and having a field for storing notes / details about infractions, editable from a web frontend will also serve the purpose in a single place.  Not sure what tracking names will bring to the party if the decisions are made based on recored playerUIDs anyway. 

 

Not trying to pick holes but just suggesting alternatives and trying to find out why this maybe better for some server owners in some cases.

Link to comment
Share on other sites

  • 0

I think we're sort of mixing up things a little here and looking back, it's mostly my fault...

 

This function really just allows you to track where a player comes into your server and uses a different name. It only writes an entry to the table if a player does this. So, is really handy if you want to keep track of who's who. This allows me know my players by their PID rather than name.

 

My comments on dupers/exploiters/others with warnings is simply that if someone intends to try and dupe again after a warning they normally always come back with a different name. So, this is also helpful for quickly spotting this. But, only is useful for this if they have changed their name.....anyway, my losing connection duping problem has been solved....see this link http://epochmod.com/forum/index.php?/topic/12886-anti-duping-script/

 

My first post on this thread was to improve this function better by modifying it to do this:

1/ Show the original alias the player had changed from?

Currently when a new row is created, the contents tell you the new alias the player is using which, is also the indication that they had a different name before. But, to find out what the original alias was you still need to search back through log files. Could both aliases (old & new) be added to the row when it is created?

 

2/ Each row only shows each alias used once? 

Currently, if a player toggles between two aliases, the same aliases keep being appended to the row. I think it would be better if in this example it only showed the 2 aliases and only added another if it was a new alias. I'm only keen to know who is who not, when they have been who...if that makes sense

Link to comment
Share on other sites

  • 0

I think we're sort of mixing up things a little here and looking back, it's mostly my fault...

 

This function really just allows you to track where a player comes into your server and uses a different name. It only writes an entry to the table if a player does this. So, is really handy if you want to keep track of who's who. This allows me know my players by their PID rather than name.

 

My comments on dupers/exploiters/others with warnings is simply that if someone intends to try and dupe again after a warning they normally always come back with a different name. So, this is also helpful for quickly spotting this. But, only is useful for this if they have changed their name.....anyway, my losing connection duping problem has been solved....see this link http://epochmod.com/forum/index.php?/topic/12886-anti-duping-script/

 

My first post on this thread was to improve this function better by modifying it to do this:

1/ Show the original alias the player had changed from?

Currently when a new row is created, the contents tell you the new alias the player is using which, is also the indication that they had a different name before. But, to find out what the original alias was you still need to search back through log files. Could both aliases (old & new) be added to the row when it is created?

 

2/ Each row only shows each alias used once? 

Currently, if a player toggles between two aliases, the same aliases keep being appended to the row. I think it would be better if in this example it only showed the 2 aliases and only added another if it was a new alias. I'm only keen to know who is who not, when they have been who...if that makes sense

 

Sure.  Understand that two directions have merged :) .

 

Have seen the script to stop the duping and it is one way although I may go a slightly different direction (prompted by the original script you linked in) and look to disable whichever key opens the main menu (witht he abort option) whilst the inventory is open.  This would be transparent and stop the duping as well.

 

Whilst the question has been answered by the code itsatrap has provided I would be more inclined to put a new alias for a playerUID in a seperate row and manage the rowcount with housekeeping as it will be easier, in my experience,  to report on and manage.  I would also timestamp the entries for better reconstruction abilities of events after the occured.  Just different ways to solve the same issue though based on personal preference. 

 

My suggestion was to further enhance a good idea to allow admins to add comments for the playerUIDs / names recording infractions accessable from a web based gui so there is an on-line record availabe to all admins.  Should be pretty easy to do and could add a fair bit of value where you have multiple admins on a server dealing with some players who change their names to generic ones popular with a lot of players.

Link to comment
Share on other sites

  • 0

Sure.  Understand that two directions have merged :) .

 

Have seen the script to stop the duping and it is one way although I may go a slightly different direction (prompted by the original script you linked in) and look to disable whichever key opens the main menu (witht he abort option) whilst the inventory is open.  This would be transparent and stop the duping as well.

 

Whilst the question has been answered by the code itsatrap has provided I would be more inclined to put a new alias for a playerUID in a seperate row and manage the rowcount with housekeeping as it will be easier, in my experience,  to report on and manage.  I would also timestamp the entries for better reconstruction abilities of events after the occured.  Just different ways to solve the same issue though based on personal preference. 

 

My suggestion was to further enhance a good idea to allow admins to add comments for the playerUIDs / names recording infractions accessable from a web based gui so there is an on-line record availabe to all admins.  Should be pretty easy to do and could add a fair bit of value where you have multiple admins on a server dealing with some players who change their names to generic ones popular with a lot of players.

RimBlock,

Since you're the in-house SQL expert, I for one, looking very much forward to an improved version of the above SQL code from you [the original poster is away since Dec. 2013...]. Thanks in advance!

Link to comment
Share on other sites

  • 0

RimBlock,

Since you're the in-house SQL expert, I for one, looking very much forward to an improved version of the above SQL code from you [the original poster is away since Dec. 2013...]. Thanks in advance!

 

Not sure about that :)  but I am happy to have a look.

 

I can work on the backend DB triggers and even the sqf code to disable the main menu whilst the inventoy is open but I have no PHP / web coding experience so to have a editable comment field connected to the player / username entry, someone else would have to put together the web frontend.

 

Will have a look over the weekend.

Link to comment
Share on other sites

  • 0

Hey Rimblock,

But, just for this code in this thread, we don't need a front end just my 2 changes (enter original player name when creating a new row and only listing the same name once) and your one change (having a notes column to add additional info) would be superb!

 

No need for a web front end on this. Are you mixing up your thoughts on the other thread on duping into this one...?  :)

Link to comment
Share on other sites

  • 0

Hey Rimblock,

But, just for this code in this thread, we don't need a front end just my 2 changes (enter original player name when creating a new row and only listing the same name once) and your one change (having a notes column to add additional info) would be superb!

 

No need for a web front end on this. Are you mixing up your thoughts on the other thread on duping into this one...?   :)

 

Those three items are all I will be really looking at.  If someone wanted to plug in to the notes field (Epoch Admin Tools for example) then they should be able to do so quite easily.

Link to comment
Share on other sites

  • 0

Those three items are all I will be really looking at.  If someone wanted to plug in to the notes field (Epoch Admin Tools for example) then they should be able to do so quite easily.

While a fully featured web front end would be cool, I guess, for now, a simple Notes field, along with the two other requests coming from real-world testing of the script by ReDBaroN would be more than adequate...

 

With regards to Notes field: 

The owner(s), -and any potential database-access-level-admins- can directly manipulate the database - I would think people at this level know what they're doing so we can do without more advanced features to make it idiot-proof. And the main thign is since you might be very busy with single-currency-and-banking-system soon [thinking about setting up a petition to have your backing on that dream lol] a quick & dirty upgrade on this would be more than adequate...

Link to comment
Share on other sites

  • 0

Hey guys, I was just looking into getting this set up on our server and I can create the table fine but making the trigger is giving me troubles.

 

I may be going about it wrong but I created the player_alias table by executing an sql file with the first block of code.

 

Then when I try to add the trigger using the same method I get an error back that reads:

[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELIMITER' at line 1
[Err] DELIMITER ;
[Msg] Finished - Unsuccessfully
--------------------------------------------------
 
I am running a MySQL database through Navicat Lite.
 
Am I completely missing how to add this trigger properly or has something changed since the code was released?
Link to comment
Share on other sites

  • 0

Hi Archaic, if you host with ST and maybe others I have no experience of, you will find that the table names are slightly different. For instance, can't really remember as I dropped ST like a stone... (lol another story....) that instead of player_login it may be called Player_LOGIN or something like that.

 

If you look at the the dB and check the case of the table (and maybe column) names, then adjust the SQL above to match.

 

Hope this helps....

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...