diff options
| author | 2025-01-23 16:35:32 +0000 | |
|---|---|---|
| committer | 2025-01-23 16:35:32 +0000 | |
| commit | b9fee8b43dc1903ecb08c81405fb83295fc64db9 (patch) | |
| tree | 80d4bb49c9a2e0e36be0e348a3900d7bec2b7da5 /src/usermanager.cpp | |
| parent | Fix the list of supported exemptions. (diff) | |
Convert debug logging from string concatenation to format strings.
When running in normal mode this will prevent a bunch of expensive
string concatenation.
Diffstat (limited to 'src/usermanager.cpp')
| -rw-r--r-- | src/usermanager.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/usermanager.cpp b/src/usermanager.cpp index 26ec95774..f2384e0a4 100644 --- a/src/usermanager.cpp +++ b/src/usermanager.cpp @@ -200,7 +200,7 @@ void UserManager::AddUser(int socket, ListenSocket* via, const irc::sockets::soc if (!b->Type.empty() && !New->exempt) { /* user banned */ - ServerInstance->Logs.Debug("BANCACHE", "Positive hit for " + New->GetAddress()); + ServerInstance->Logs.Debug("BANCACHE", "Positive hit for {}", New->GetAddress()); if (!ServerInstance->Config->XLineMessage.empty()) New->WriteNumeric(ERR_YOUREBANNEDCREEP, ServerInstance->Config->XLineMessage); @@ -212,7 +212,7 @@ void UserManager::AddUser(int socket, ListenSocket* via, const irc::sockets::soc } else { - ServerInstance->Logs.Debug("BANCACHE", "Negative hit for " + New->GetAddress()); + ServerInstance->Logs.Debug("BANCACHE", "Negative hit for {}", New->GetAddress()); } } else @@ -241,13 +241,13 @@ void UserManager::QuitUser(User* user, const std::string& quitmessage, const std { if (user->quitting) { - ServerInstance->Logs.Debug("USERS", "BUG: Tried to quit quitting user: " + user->nick); + ServerInstance->Logs.Debug("USERS", "BUG: Tried to quit quitting user: {}", user->nick); return; } if (IS_SERVER(user)) { - ServerInstance->Logs.Debug("USERS", "BUG: Tried to quit server user: " + user->nick); + ServerInstance->Logs.Debug("USERS", "BUG: Tried to quit server user: {}", user->nick); return; } @@ -308,7 +308,7 @@ void UserManager::QuitUser(User* user, const std::string& quitmessage, const std } if (!clientlist.erase(user->nick)) - ServerInstance->Logs.Debug("USERS", "BUG: Nick not found in clientlist, cannot remove: " + user->nick); + ServerInstance->Logs.Debug("USERS", "BUG: Nick not found in clientlist, cannot remove: {}", user->nick); uuidlist.erase(user->uuid); user->PurgeEmptyChannels(); |
