X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=util%2Fprosodyctl.lua;h=7c9a3c19dcf7c0edb6ab95959627d197a429cb45;hb=87fd458b978eae310245ec4678ec1312e8da3f31;hp=f8f2864412d48bd83dfd60b69c806e9cb287bfc5;hpb=1fd4988df04d0b2735c7ffce8fdd96b75929598e;p=prosody.git diff --git a/util/prosodyctl.lua b/util/prosodyctl.lua index f8f28644..7c9a3c19 100644 --- a/util/prosodyctl.lua +++ b/util/prosodyctl.lua @@ -22,7 +22,7 @@ local nodeprep, nameprep = stringprep.nodeprep, stringprep.nameprep; local io, os = io, os; local print = print; -local tostring, tonumber = tostring, tonumber; +local tonumber = tonumber; local CFG_SOURCEDIR = _G.CFG_SOURCEDIR; @@ -44,7 +44,7 @@ end local function getchar(n) local stty_ret = os.execute("stty raw -echo 2>/dev/null"); local ok, char; - if stty_ret == 0 then + if stty_ret == true or stty_ret == 0 then ok, char = pcall(io.read, n or 1); os.execute("stty sane"); else @@ -149,7 +149,7 @@ local function adduser(params) end local function user_exists(params) - local user, host, password = nodeprep(params.user), nameprep(params.host), params.password; + local user, host = nodeprep(params.user), nameprep(params.host); storagemanager.initialize_host(host); local provider = prosody.hosts[host].users;