Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/server
diff options
context:
space:
mode:
Diffstat (limited to 'source/server')
-rw-r--r--source/server/StarServerQueryThread.cpp2
-rw-r--r--source/server/StarServerRconClient.cpp12
-rw-r--r--source/server/StarServerRconThread.cpp2
-rw-r--r--source/server/main.cpp2
4 files changed, 9 insertions, 9 deletions
diff --git a/source/server/StarServerQueryThread.cpp b/source/server/StarServerQueryThread.cpp
index 446ecbb..2011f42 100644
--- a/source/server/StarServerQueryThread.cpp
+++ b/source/server/StarServerQueryThread.cpp
@@ -220,7 +220,7 @@ void ServerQueryThread::run() {
processPacket(udpAddress, udpData, len);
} catch (SocketClosedException const&) {
} catch (std::exception const& e) {
- Logger::error("ServerQueryThread exception caught: %s", outputException(e, true));
+ Logger::error("ServerQueryThread exception caught: {}", outputException(e, true));
}
}
}
diff --git a/source/server/StarServerRconClient.cpp b/source/server/StarServerRconClient.cpp
index a42a8ea..91e651b 100644
--- a/source/server/StarServerRconClient.cpp
+++ b/source/server/StarServerRconClient.cpp
@@ -36,12 +36,12 @@ String ServerRconClient::handleCommand(String commandLine) {
return commandLine;
} else if (command == "broadcast" || command == "say") {
m_universe->adminBroadcast(commandLine);
- return strf("OK: said %s", commandLine);
+ return strf("OK: said {}", commandLine);
} else if (command == "stop") {
m_universe->stop();
return "OK: shutting down";
} else {
- return m_universe->adminCommand(strf("%s %s", command, commandLine));
+ return m_universe->adminCommand(strf("{} {}", command, commandLine));
}
}
@@ -118,17 +118,17 @@ void ServerRconClient::processRequest() {
String command;
m_packetBuffer >> command;
try {
- Logger::info("RCON %s: %s", m_socket->remoteAddress(), command);
+ Logger::info("RCON {}: {}", m_socket->remoteAddress(), command);
sendCmdResponse(requestId, handleCommand(command));
} catch (std::exception const& e) {
- sendCmdResponse(requestId, strf("RCON: Error executing: %s: %s", command, outputException(e, true)));
+ sendCmdResponse(requestId, strf("RCON: Error executing: {}: {}", command, outputException(e, true)));
}
} else {
sendAuthFailure();
}
break;
default:
- sendCmdResponse(requestId, strf("Unknown request %06x", cmd));
+ sendCmdResponse(requestId, strf("Unknown request {:06x}", cmd));
}
}
@@ -138,7 +138,7 @@ void ServerRconClient::run() {
processRequest();
} catch (NoMoreRequests const&) {
} catch (std::exception const& e) {
- Logger::error("ServerRconClient exception caught: %s", outputException(e, false));
+ Logger::error("ServerRconClient exception caught: {}", outputException(e, false));
}
}
diff --git a/source/server/StarServerRconThread.cpp b/source/server/StarServerRconThread.cpp
index 45f94b3..a9842ee 100644
--- a/source/server/StarServerRconThread.cpp
+++ b/source/server/StarServerRconThread.cpp
@@ -55,7 +55,7 @@ void ServerRconThread::run() {
}
}
} catch (std::exception const& e) {
- Logger::error("ServerRconThread exception caught: %s", e.what());
+ Logger::error("ServerRconThread exception caught: {}", e.what());
}
}
diff --git a/source/server/main.cpp b/source/server/main.cpp
index 6522acf..8d734e0 100644
--- a/source/server/main.cpp
+++ b/source/server/main.cpp
@@ -45,7 +45,7 @@ int main(int argc, char** argv) {
auto configuration = root->configuration();
{
- Logger::info("Server Version %s (%s) Source ID: %s Protocol: %s", StarVersionString, StarArchitectureString, StarSourceIdentifierString, StarProtocolVersion);
+ Logger::info("Server Version {} ({}) Source ID: {} Protocol: {}", StarVersionString, StarArchitectureString, StarSourceIdentifierString, StarProtocolVersion);
UniverseServerUPtr server = make_unique<UniverseServer>(root->toStoragePath("universe"));
server->setListeningTcp(true);