From: Ilya Date: Wed, 10 Apr 2013 03:34:58 +0000 (+0400) Subject: Server::ProcessData(): call getBanName once instead of twice (#639) X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=e61b1773c927cbb8eddd2059cfb3d7c8c14fd149;p=zefram%2Fminetest%2Fminetest_engine.git Server::ProcessData(): call getBanName once instead of twice (#639) --- diff --git a/src/server.cpp b/src/server.cpp index 561e03c7..8ce8df34 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; }