Began to implement user accounts using the database
I'm mostly just testing the waters at this stage, and i've left some debug code in. There's no way to unload, delete, etc. the accounts, but that comes later.
This commit is contained in:
@@ -46,11 +46,17 @@ void ServerApplication::HandleJoinRequest(SerialPacket packet) {
|
||||
ClientData newClient;
|
||||
newClient.address = packet.meta.srcAddress;
|
||||
|
||||
//debug
|
||||
std::cout << "Function Return: " << LoadUserAccount(packet.clientInfo.username, ClientData::uidCounter) << std::endl;
|
||||
|
||||
for (auto& it : accountMap) {
|
||||
std::cout << "Account(" << it.first << "): " << it.second.username << std::endl;
|
||||
}
|
||||
|
||||
//TODO: move this into the character management code
|
||||
//create the new character
|
||||
CharacterData newCharacter;
|
||||
newCharacter.clientIndex = ClientData::uidCounter;
|
||||
newCharacter.username = packet.clientInfo.username;
|
||||
newCharacter.handle = packet.clientInfo.handle;
|
||||
newCharacter.avatar = packet.clientInfo.avatar;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user