aboutsummaryrefslogtreecommitdiff
path: root/clientmods/dragonfire/chat/spam.lua
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2020-10-04 10:50:07 +0200
committerElias Fleckenstein <eliasfleckenstein@web.de>2020-10-04 10:50:07 +0200
commitb9f8f0a232d9d00a323084e0e4807b3e3469720d (patch)
tree564679fd09da5cb4ef7da82dde5b7d8d5c2d7aee /clientmods/dragonfire/chat/spam.lua
parentaf085acbd32707576ff9e67c3b267ad6cf267288 (diff)
downloaddragonfireclient-b9f8f0a232d9d00a323084e0e4807b3e3469720d.tar.xz
The Robot Update
Diffstat (limited to 'clientmods/dragonfire/chat/spam.lua')
-rw-r--r--clientmods/dragonfire/chat/spam.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/clientmods/dragonfire/chat/spam.lua b/clientmods/dragonfire/chat/spam.lua
new file mode 100644
index 000000000..991846d33
--- /dev/null
+++ b/clientmods/dragonfire/chat/spam.lua
@@ -0,0 +1,12 @@
+local etime = 0
+
+minetest.register_globalstep(function(dtime)
+ etime = etime + dtime
+ if etime < 10/8 then return end
+ etime = 0
+ local spam = minetest.settings:get("chat_spam")
+ local enable_spam = minetest.settings:get("chat_enable_spam")
+ if enable_spam and spam then
+ local _ = chat.send(spam) or minetest.send_chat_message(spam)
+ end
+end)