summaryrefslogtreecommitdiff
path: root/src/network/clientpackethandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/clientpackethandler.cpp')
-rw-r--r--src/network/clientpackethandler.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/network/clientpackethandler.cpp b/src/network/clientpackethandler.cpp
index 97fa93e95..9bcc58110 100644
--- a/src/network/clientpackethandler.cpp
+++ b/src/network/clientpackethandler.cpp
@@ -413,7 +413,7 @@ void Client::handleCommand_ChatMessage(NetworkPacket* pkt)
}
// If chat message not consummed by client lua API
- if (!m_script->on_receiving_message(wide_to_utf8(message))) {
+ if (!moddingEnabled() || !m_script->on_receiving_message(wide_to_utf8(message))) {
pushToChatQueue(message);
}
}
@@ -526,7 +526,9 @@ void Client::handleCommand_HP(NetworkPacket* pkt)
player->hp = hp;
- m_script->on_hp_modification(hp);
+ if (moddingEnabled()) {
+ m_script->on_hp_modification(hp);
+ }
if (hp < oldhp) {
// Add to ClientEvent queue