Comparison

plugins/mod_admin_telnet.lua @ 5665:da1881e1b35b

mod_admin_telnet: Fix another wrong boolean expression
author Kim Alvefur <zash@zash.se>
date Mon, 10 Jun 2013 14:35:35 +0200
parent 5643:e612e1887e39
child 5666:c1e1b265ee82
child 5672:0c68cea74d5d
comparison
equal deleted inserted replaced
5663:4e51ceee469c 5665:da1881e1b35b
971 971
972 function def_env.user:password(jid, password) 972 function def_env.user:password(jid, password)
973 local username, host = jid_split(jid); 973 local username, host = jid_split(jid);
974 if not hosts[host] then 974 if not hosts[host] then
975 return nil, "No such host: "..host; 975 return nil, "No such host: "..host;
976 elseif um.user_exists(username, host) then 976 elseif not um.user_exists(username, host) then
977 return nil, "No such user"; 977 return nil, "No such user";
978 end 978 end
979 local ok, err = um.set_password(username, password, host); 979 local ok, err = um.set_password(username, password, host);
980 if ok then 980 if ok then
981 return true, "User password changed"; 981 return true, "User password changed";