Skip to content

Commit

Permalink
write server software to file
Browse files Browse the repository at this point in the history
  • Loading branch information
in1tiate committed Jul 13, 2024
1 parent 7c1fe80 commit 69aa1fd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/packet_distribution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
client_id = f_contents.at(0).toInt();
server_software = f_contents.at(1);

QString filename = "serverdata.txt";
QFile file(filename);
if (file.open(QIODevice::ReadWrite)) {
QTextStream stream(&file);
stream << server_software << Qt::endl;
}

net_manager->server_connected(true);

QStringList f_contents = {"AO2", get_version_string()};
Expand Down

0 comments on commit 69aa1fd

Please sign in to comment.