Comparison

prosodyctl @ 10369:9d20fca6a485

prosodyctl: Print friendly version of error messages
author Kim Alvefur <zash@zash.se>
date Fri, 01 Nov 2019 23:16:58 +0100
parent 10270:c2b9ff42db03
child 10434:8f709577fe8e
comparison
equal deleted inserted replaced
10368:76eb79d372de 10369:9d20fca6a485
142 142
143 local ok, msg = prosodyctl.adduser { user = user, host = host, password = password }; 143 local ok, msg = prosodyctl.adduser { user = user, host = host, password = password };
144 144
145 if ok then return 0; end 145 if ok then return 0; end
146 146
147 show_message(msg) 147 show_message(error_messages[msg])
148 return 1; 148 return 1;
149 end 149 end
150 150
151 function commands.passwd(arg) 151 function commands.passwd(arg)
152 if not arg[1] or arg[1] == "--help" then 152 if not arg[1] or arg[1] == "--help" then