Skip to content

Commit

Permalink
Add add rank in chat
Browse files Browse the repository at this point in the history
  • Loading branch information
bigfoot547 authored Nov 1, 2016
1 parent 65a52a9 commit 108c0e4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,11 @@ minetest.register_on_shutdown(function()
end)

minetest.register_on_chat_message(function(name, message)
if string.find(message, '/') and string.find(message, '/') == 1 then
minetest.chat_send_all("<["..minetest.colorize(rank_colors[ranks[name]], ranks[name]).."] "..name.."> "..message)
if message:sub(1,1) == "/" then
return false
else
return
minetest.chat_send_all("<["..minetest.colorize(rank_colors[ranks[name]], ranks[name]).."] "..name.."> "..message)
return true
end
return ""
end)
Expand Down

0 comments on commit 108c0e4

Please sign in to comment.