From: Anthony Date: Sun, 18 Nov 2012 23:18:45 +0000 (-0500) Subject: Fix server crash on /clearpassword X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=3ba9b263103d2cd5218246b05d19b6485347ae28;p=zefram%2Fminetest%2Fminetest_engine.git Fix server crash on /clearpassword According to #253, using `/clearpassword` without an argument causes the server to crash from an assertion failure. I've resubmitted matttpt's patch as a pull request to aid in merging. --- diff --git a/builtin/chatcommands.lua b/builtin/chatcommands.lua index 9f55f1af..f25a276e 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, '')