summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2015-07-24 00:32:20 -0500
committercheapie <no-email-for-you@example.com>2015-07-24 00:32:20 -0500
commitd9bf531c22a8d4de6778d75a8126bccc3889b6f8 (patch)
treef41fa885432b0dddd60894ea315d9f84d0b0811b /init.lua
downloaddropthecaps-d9bf531c22a8d4de6778d75a8126bccc3889b6f8.tar
dropthecaps-d9bf531c22a8d4de6778d75a8126bccc3889b6f8.tar.gz
dropthecaps-d9bf531c22a8d4de6778d75a8126bccc3889b6f8.tar.bz2
dropthecaps-d9bf531c22a8d4de6778d75a8126bccc3889b6f8.tar.xz
dropthecaps-d9bf531c22a8d4de6778d75a8126bccc3889b6f8.zip
Add Content
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/init.lua b/init.lua
new file mode 100644
index 0000000..421b04d
--- /dev/null
+++ b/init.lua
@@ -0,0 +1,8 @@
+minetest.register_on_chat_message(function(name, message)
+ if message:len()>5 and message:lower()~=message and message:upper()==message then
+ minetest.kick_player(name,"Sending all-caps messages is not allowed")
+ minetest.chat_send_all(string.format("* %s was kicked for sending an all-caps message.",name))
+ if minetest.get_modpath("irc") then irc:say(string.format("* %s was kicked for sending an all-caps message.",name)) end
+ minetest.log("action", string.format("Kicked %s for sending an all-caps message",name))
+ end
+end)