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

summaryrefslogtreecommitdiff
path: root/source/server/StarServerRconClient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/server/StarServerRconClient.cpp')
-rw-r--r--source/server/StarServerRconClient.cpp12
1 files changed, 6 insertions, 6 deletions
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));
}
}