diff --git a/src/logger.cpp b/src/logger.cpp index e9730e6..848a455 100644 --- a/src/logger.cpp +++ b/src/logger.cpp @@ -65,7 +65,7 @@ void Logger::logModcall(AOClient* client, AOPacket* packet) QString area_name = client->getServer()->area_names.value(client->current_area); QString char_name = client->current_char; QString ipid = client->getIpid(); - QString message = packet->contents[1]; + QString message = packet->contents[0]; QString log_entry = QStringLiteral("[%1][%2][MODCALL] %3(%4): %5\n") .arg(time) diff --git a/src/packets.cpp b/src/packets.cpp index 298a17a..a0ba7e1 100644 --- a/src/packets.cpp +++ b/src/packets.cpp @@ -153,7 +153,6 @@ void AOClient::pktIcChat(AreaData* area, int argc, QStringList argv, AOPacket pa void AOClient::pktOocChat(AreaData* area, int argc, QStringList argv, AOPacket packet) { ooc_name = argv[0]; - area->logger->logOOC(this, &packet); if(argv[1].at(0) == '/') { QStringList cmd_argv = argv[1].split(" ", QString::SplitBehavior::SkipEmptyParts); QString command = cmd_argv[0].trimmed().toLower(); @@ -161,10 +160,12 @@ void AOClient::pktOocChat(AreaData* area, int argc, QStringList argv, AOPacket p cmd_argv.removeFirst(); int cmd_argc = cmd_argv.length(); handleCommand(command, cmd_argc, cmd_argv); - return; } - // TODO: zalgo strip - server->broadcast(packet, current_area); + else { + // TODO: zalgo strip + server->broadcast(packet, current_area); + } + area->logger->logOOC(this, &packet); } void AOClient::pktPing(AreaData* area, int argc, QStringList argv, AOPacket packet)