From: Anthony Date: Sun, 18 Nov 2012 23:18:45 +0000 (-0500) Subject: Fix server crash on /clearpassword X-Git-Tag: 0.4.4~83 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3ba9b263103d2cd5218246b05d19b6485347ae28;p=oweals%2Fminetest.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 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, '')