diff options
| author | Shauren <shauren.trinity@gmail.com> | 2023-08-15 20:10:04 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2023-08-15 20:10:04 +0200 |
| commit | aaa6e73c8ca6d60e943cb964605536eb78219db2 (patch) | |
| tree | f5a0187925e646ef071d647efa7a5dac20501813 /src/server/worldserver/RemoteAccess | |
| parent | 825c697a764017349ca94ecfca8f30a8365666c0 (diff) | |
Core/Logging: Switch from fmt::sprintf to fmt::format (c++20 standard compatible api)
(cherry picked from commit d791afae1dfcfaf592326f787755ca32d629e4d3)
Diffstat (limited to 'src/server/worldserver/RemoteAccess')
| -rw-r--r-- | src/server/worldserver/RemoteAccess/RASession.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/server/worldserver/RemoteAccess/RASession.cpp b/src/server/worldserver/RemoteAccess/RASession.cpp index 4355df67506..f2b1833704e 100644 --- a/src/server/worldserver/RemoteAccess/RASession.cpp +++ b/src/server/worldserver/RemoteAccess/RASession.cpp @@ -57,7 +57,7 @@ void RASession::Start() if (username.empty()) return; - TC_LOG_INFO("commands.ra", "Accepting RA connection from user %s (IP: %s)", username.c_str(), GetRemoteIpAddress().c_str()); + TC_LOG_INFO("commands.ra", "Accepting RA connection from user {} (IP: {})", username, GetRemoteIpAddress()); Send("Password: "); @@ -72,7 +72,7 @@ void RASession::Start() return; } - TC_LOG_INFO("commands.ra", "User %s (IP: %s) authenticated correctly to RA", username.c_str(), GetRemoteIpAddress().c_str()); + TC_LOG_INFO("commands.ra", "User {} (IP: {}) authenticated correctly to RA", username, GetRemoteIpAddress()); // Authentication successful, send the motd Send(std::string(std::string(Motd::GetMotd()) + "\r\n").c_str()); @@ -131,7 +131,7 @@ bool RASession::CheckAccessLevel(const std::string& user) if (!result) { - TC_LOG_INFO("commands.ra", "User %s does not exist in database", user.c_str()); + TC_LOG_INFO("commands.ra", "User {} does not exist in database", user); return false; } @@ -139,12 +139,12 @@ bool RASession::CheckAccessLevel(const std::string& user) if (fields[1].GetUInt8() < sConfigMgr->GetIntDefault("Ra.MinLevel", 3)) { - TC_LOG_INFO("commands.ra", "User %s has no privilege to login", user.c_str()); + TC_LOG_INFO("commands.ra", "User {} has no privilege to login", user); return false; } else if (fields[2].GetInt32() != -1) { - TC_LOG_INFO("commands.ra", "User %s has to be assigned on all realms (with RealmID = '-1')", user.c_str()); + TC_LOG_INFO("commands.ra", "User {} has to be assigned on all realms (with RealmID = '-1')", user); return false; } @@ -174,7 +174,7 @@ bool RASession::CheckPassword(const std::string& user, const std::string& pass) return true; } - TC_LOG_INFO("commands.ra", "Wrong password for user: %s", user.c_str()); + TC_LOG_INFO("commands.ra", "Wrong password for user: {}", user); return false; } @@ -183,7 +183,7 @@ bool RASession::ProcessCommand(std::string& command) if (command.length() == 0) return true; - TC_LOG_INFO("commands.ra", "Received command: %s", command.c_str()); + TC_LOG_INFO("commands.ra", "Received command: {}", command); // handle quit, exit and logout commands to terminate connection if (command == "quit" || command == "exit" || command == "logout") |
