#include "LoginServ.h" #include "../../src/Utility.h" int HandleOpcodeLS_COMPUTER_USER(Packet* pck, GwClient* pClient) { GetClientData(); Util::Hash(&pClient->inBuffer.at(0), pMyClient->compHash, pClient->inBuffer.size()-20); //Get the computer user name wchar_t userName[100]; memset(userName, 0, sizeof(wchar_t) * 100); ushort userNameLength=pck->ReadShort(); if(userNameLength > 100) { return -1; } pck->Read(&userName, userNameLength*2); //Get the computer name wchar_t computerName[100]; memset(computerName, 0, sizeof(wchar_t) * 100); ushort computerNameLength=pck->ReadShort(); if(computerNameLength > 100) { return -2; } pck->Read(&computerName, computerNameLength * 2); printf("User Name: "); wprintf(userName); printf("\n"); printf("Computer Name: "); wprintf(computerName); printf("\n"); return pck->PacketSize(); }