diff options
author | Perttu Ahola <celeron55@gmail.com> | 2012-03-22 13:35:32 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-03-22 13:35:32 +0200 |
commit | 9bd75d5668e89dc41857e01d62becce79a9f9ac8 (patch) | |
tree | f2bd4bfabedb5e69730f480ac8781574e119494a | |
parent | fde676a43adfbbfa7e44eacd7d442c2bc26c8d88 (diff) | |
download | minetest-9bd75d5668e89dc41857e01d62becce79a9f9ac8.tar.gz minetest-9bd75d5668e89dc41857e01d62becce79a9f9ac8.tar.bz2 minetest-9bd75d5668e89dc41857e01d62becce79a9f9ac8.zip |
Log at info level when a banned client connects
-rw-r--r-- | src/server.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/server.cpp b/src/server.cpp index 87d43dc69..7afb22846 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -1898,13 +1898,17 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id) try{ Address address = m_con.GetPeerAddress(peer_id); + std::string addr_s = address.serializeString(); // drop player if is ip is banned - if(m_banmanager.isIpBanned(address.serializeString())){ + if(m_banmanager.isIpBanned(addr_s)){ + infostream<<"Server: A banned client tried to connect from " + <<addr_s<<"; banned name was " + <<m_banmanager.getBanName(addr_s)<<std::endl; + // This actually doesn't seem to transfer to the client SendAccessDenied(m_con, peer_id, L"Your ip is banned. Banned name was " - +narrow_to_wide(m_banmanager.getBanName( - address.serializeString()))); + +narrow_to_wide(m_banmanager.getBanName(addr_s))); m_con.DeletePeer(peer_id); return; } |