diff --git a/source/server/SocketClient.cpp b/source/server/SocketClient.cpp index bcf5a82..d22c89f 100644 --- a/source/server/SocketClient.cpp +++ b/source/server/SocketClient.cpp @@ -77,7 +77,8 @@ bool SocketClient::SEND(Packet *packet) { int valread = 0; - //Logger::log("Sending Packet Size: %d Sending Type: %s\n", packet->mPacketSize, packetNames[packet->mType]); + if (packet->mType != PLAYERINF && packet->mType != HACKCAPINF) + Logger::log("Sending packet: %s\n", packetNames[packet->mType]); if ((valread = nn::socket::Send(this->socket_log_socket, buffer, packet->mPacketSize + sizeof(Packet), this->sock_flags) > 0)) { return true; @@ -93,7 +94,7 @@ bool SocketClient::SEND(Packet *packet) { bool SocketClient::RECV() { if (this->socket_log_state != SOCKET_LOG_CONNECTED) { - Logger::log("Unable To Recieve! Socket Not Connected.\n"); + Logger::log("Unable To Receive! Socket Not Connected.\n"); this->socket_errno = nn::socket::GetLastErrno(); return false; } @@ -122,6 +123,10 @@ bool SocketClient::RECV() { if (header->mType != PacketType::UNKNOWN && fullSize <= MAXPACKSIZE && fullSize > 0) { + if (header->mType != PLAYERINF && header->mType != HACKCAPINF) + Logger::log("Received packet (from %02X%02X): %s\n", + header->mUserID.data[0], header->mUserID.data[1], packetNames[header->mType]); + char* packetBuf = (char*)malloc(fullSize); if (packetBuf) {