From e61b1773c927cbb8eddd2059cfb3d7c8c14fd149 Mon Sep 17 00:00:00 2001 From: Ilya Date: Wed, 10 Apr 2013 07:34:58 +0400 Subject: Server::ProcessData(): call getBanName once instead of twice (#639) --- src/server.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/server.cpp b/src/server.cpp index 561e03c7a..8ce8df349 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -1776,12 +1776,13 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id) // drop player if is ip is banned if(m_banmanager->isIpBanned(addr_s)){ + std::string ban_name = m_banmanager->getBanName(addr_s); infostream<<"Server: A banned client tried to connect from " <getBanName(addr_s)<getBanName(addr_s))); + +narrow_to_wide(ban_name)); m_con.DeletePeer(peer_id); return; } -- cgit v1.2.3