From b9fee8b43dc1903ecb08c81405fb83295fc64db9 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 23 Jan 2025 16:35:32 +0000 Subject: Convert debug logging from string concatenation to format strings. When running in normal mode this will prevent a bunch of expensive string concatenation. --- src/users.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/users.cpp') diff --git a/src/users.cpp b/src/users.cpp index 7db26cfb5..d565af287 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -483,7 +483,7 @@ void LocalUser::FullConnect() ServerInstance->SNO.WriteToSnoMask('c', "Client connecting on port {} (class {}): {} ({}) [{}\x0F]", server_sa.port(), GetClass()->GetName(), GetRealMask(), GetAddress(), GetRealName()); - ServerInstance->Logs.Debug("BANCACHE", "Adding NEGATIVE hit for " + this->GetAddress()); + ServerInstance->Logs.Debug("BANCACHE", "Adding NEGATIVE hit for {}", this->GetAddress()); ServerInstance->BanCache.AddHit(this->GetAddress(), "", ""); // reset the flood penalty (which could have been raised due to things like auto +x) CommandFloodPenalty = 0; @@ -504,7 +504,7 @@ bool User::ChangeNick(const std::string& newnick, time_t newts) { if (quitting) { - ServerInstance->Logs.Debug("USERS", "BUG: Attempted to change nick of a quitting user: " + this->nick); + ServerInstance->Logs.Debug("USERS", "BUG: Attempted to change nick of a quitting user: {}", this->nick); return false; } -- cgit v1.3.1-10-gc9f91