diff --git a/core/src/packets.cpp b/core/src/packets.cpp index 392b3dc..f2512d1 100644 --- a/core/src/packets.cpp +++ b/core/src/packets.cpp @@ -316,18 +316,18 @@ void AOClient::pktWebSocketIp(AreaData* area, int argc, QStringList argv, AOPack { // Special packet to set remote IP from the webao proxy // Only valid if from a local ip - calculateIpid(); if (remote_ip.isLoopback()) { +#ifdef NET_DEBUG + qDebug() << "ws ip set to" << argv[0]; +#endif + remote_ip = QHostAddress(argv[0]); + calculateIpid(); auto ban = server->db_manager->isIPBanned(ipid); if (ban.first) { sendPacket("BD", {ban.second}); socket->close(); return; } -#ifdef NET_DEBUG - qDebug() << "ws ip set to" << argv[0]; -#endif - remote_ip = QHostAddress(argv[0]); int multiclient_count = 0; for (AOClient* joined_client : server->clients) {