View Single Post
  #1  
Old 11-06-2021, 08:26 PM
TercerRigo TercerRigo is offline
Orc

TercerRigo's Avatar

Join Date: Jan 2015
Posts: 34
Default

I'm the sort of person that wants to be 100% sure, so I looked at the code for deleting a char on eqemu :

https://github.com/EQEmu/Server/blob...rld/client.cpp at 965 we have :

Code:
bool Client::HandleDeleteCharacterPacket(const EQApplicationPacket *app) {

	uint32 char_acct_id = database.GetAccountIDByChar((char*)app->pBuffer);
	if(char_acct_id == GetAccountID()) {
		LogInfo("Delete character: [{}]", app->pBuffer);
		database.DeleteCharacter((char *)app->pBuffer);
		SendCharInfo();
	}

	return true;
}
database.DeleteCharacter((char *)app->pBuffer); seems to be where the magic happens, which leads us to : https://github.com/EQEmu/Server/blob...n/database.cpp at 367

For soft deletes it runs this :

Code:
			SQL(
				UPDATE
				character_data
				SET
				name = SUBSTRING(CONCAT(name, '-deleted-', UNIX_TIMESTAMP()), 1, 64),
				deleted_at = NOW()
				WHERE
				id = '{}'
			),
Which my queries undo, for hard deletes it purges everything related to that character. If p1999 is running this, or similar code, then soft deletes should be easily recoverable. Hard deletes would require restoring from a backup which would be a pain to deal with and unlikely to ever happen.
Reply With Quote