aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
Diffstat (limited to 'builtin')
-rw-r--r--builtin/chatcommands.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/chatcommands.lua b/builtin/chatcommands.lua
index 9f55f1afc..f25a276ea 100644
--- a/builtin/chatcommands.lua
+++ b/builtin/chatcommands.lua
@@ -215,8 +215,8 @@ minetest.register_chatcommand("clearpassword", {
privs = {password=true},
func = function(name, param)
toname = param
- if not toname then
- minetest.chat_send_player(toname, "Name field required")
+ if toname == "" then
+ minetest.chat_send_player(name, "Name field required")
return
end
minetest.set_player_password(toname, '')