mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 01:53:45 +01:00
Server: Improve some log messages (#9820)
This commit is contained in:
parent
f34c62c47f
commit
d1c6cc72cc
@ -111,8 +111,6 @@ void Server::handleCommand_Init(NetworkPacket* pkt)
|
|||||||
|
|
||||||
if (depl_serial_v == SER_FMT_VER_INVALID) {
|
if (depl_serial_v == SER_FMT_VER_INVALID) {
|
||||||
actionstream << "Server: A mismatched client tried to connect from " <<
|
actionstream << "Server: A mismatched client tried to connect from " <<
|
||||||
addr_s << std::endl;
|
|
||||||
infostream << "Server: Cannot negotiate serialization version with " <<
|
|
||||||
addr_s << " client_max=" << (int)client_max << std::endl;
|
addr_s << " client_max=" << (int)client_max << std::endl;
|
||||||
DenyAccess(peer_id, SERVER_ACCESSDENIED_WRONG_VERSION);
|
DenyAccess(peer_id, SERVER_ACCESSDENIED_WRONG_VERSION);
|
||||||
return;
|
return;
|
||||||
@ -903,7 +901,7 @@ bool Server::checkInteractDistance(RemotePlayer *player, const f32 d, const std:
|
|||||||
<< " tried to access " << what
|
<< " tried to access " << what
|
||||||
<< " from too far: "
|
<< " from too far: "
|
||||||
<< "d=" << d << ", max_d=" << max_d
|
<< "d=" << d << ", max_d=" << max_d
|
||||||
<< ". ignoring." << std::endl;
|
<< "; ignoring." << std::endl;
|
||||||
// Call callbacks
|
// Call callbacks
|
||||||
m_script->on_cheat(player->getPlayerSAO(), "interacted_too_far");
|
m_script->on_cheat(player->getPlayerSAO(), "interacted_too_far");
|
||||||
return false;
|
return false;
|
||||||
@ -956,7 +954,7 @@ void Server::handleCommand_Interact(NetworkPacket *pkt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (playersao->isDead()) {
|
if (playersao->isDead()) {
|
||||||
actionstream << "Server: NoCheat: " << player->getName()
|
actionstream << "Server: " << player->getName()
|
||||||
<< " tried to interact while dead; ignoring." << std::endl;
|
<< " tried to interact while dead; ignoring." << std::endl;
|
||||||
if (pointed.type == POINTEDTHING_NODE) {
|
if (pointed.type == POINTEDTHING_NODE) {
|
||||||
// Re-send block to revert change on client-side
|
// Re-send block to revert change on client-side
|
||||||
@ -1145,7 +1143,7 @@ void Server::handleCommand_Interact(NetworkPacket *pkt)
|
|||||||
playersao->noCheatDigEnd();
|
playersao->noCheatDigEnd();
|
||||||
// If player didn't start digging this, ignore dig
|
// If player didn't start digging this, ignore dig
|
||||||
if (nocheat_p != p_under) {
|
if (nocheat_p != p_under) {
|
||||||
infostream << "Server: NoCheat: " << player->getName()
|
infostream << "Server: " << player->getName()
|
||||||
<< " started digging "
|
<< " started digging "
|
||||||
<< PP(nocheat_p) << " and completed digging "
|
<< PP(nocheat_p) << " and completed digging "
|
||||||
<< PP(p_under) << "; not digging." << std::endl;
|
<< PP(p_under) << "; not digging." << std::endl;
|
||||||
@ -1169,9 +1167,9 @@ void Server::handleCommand_Interact(NetworkPacket *pkt)
|
|||||||
}
|
}
|
||||||
// If can't dig, ignore dig
|
// If can't dig, ignore dig
|
||||||
if (!params.diggable) {
|
if (!params.diggable) {
|
||||||
infostream << "Server: NoCheat: " << player->getName()
|
infostream << "Server: " << player->getName()
|
||||||
<< " completed digging " << PP(p_under)
|
<< " completed digging " << PP(p_under)
|
||||||
<< ", which is not diggable with tool. not digging."
|
<< ", which is not diggable with tool; not digging."
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
is_valid_dig = false;
|
is_valid_dig = false;
|
||||||
// Call callbacks
|
// Call callbacks
|
||||||
@ -1195,7 +1193,7 @@ void Server::handleCommand_Interact(NetworkPacket *pkt)
|
|||||||
}
|
}
|
||||||
// Dig not possible
|
// Dig not possible
|
||||||
else {
|
else {
|
||||||
infostream << "Server: NoCheat: " << player->getName()
|
infostream << "Server: " << player->getName()
|
||||||
<< " completed digging " << PP(p_under)
|
<< " completed digging " << PP(p_under)
|
||||||
<< "too fast; not digging." << std::endl;
|
<< "too fast; not digging." << std::endl;
|
||||||
is_valid_dig = false;
|
is_valid_dig = false;
|
||||||
|
@ -656,9 +656,9 @@ bool PlayerSAO::checkMovementCheat()
|
|||||||
float lag_pool_max = m_env->getMaxLagEstimate() * 2.0;
|
float lag_pool_max = m_env->getMaxLagEstimate() * 2.0;
|
||||||
lag_pool_max = MYMAX(lag_pool_max, LAG_POOL_MIN);
|
lag_pool_max = MYMAX(lag_pool_max, LAG_POOL_MIN);
|
||||||
if (m_time_from_last_teleport > lag_pool_max) {
|
if (m_time_from_last_teleport > lag_pool_max) {
|
||||||
actionstream << "Player " << m_player->getName()
|
actionstream << "Server: " << m_player->getName()
|
||||||
<< " moved too fast; resetting position"
|
<< " moved too fast: V=" << d_vert << ", H=" << d_horiz
|
||||||
<< std::endl;
|
<< "; resetting position." << std::endl;
|
||||||
cheated = true;
|
cheated = true;
|
||||||
}
|
}
|
||||||
setBasePosition(m_last_good_position);
|
setBasePosition(m_last_good_position);
|
||||||
|
Loading…
Reference in New Issue
Block a user