Comparison

plugins/mod_admin_telnet.lua @ 5643:e612e1887e39

mod_admin_telnet: Fix inverted boolean logic
author Kim Alvefur <zash@zash.se>
date Tue, 04 Jun 2013 19:35:41 +0200
parent 5630:5f3c0b11aa88
child 5645:ae079d57af2e
child 5665:da1881e1b35b
comparison
equal deleted inserted replaced
5642:5862bb57a3f1 5643:e612e1887e39
956 956
957 function def_env.user:delete(jid) 957 function def_env.user:delete(jid)
958 local username, host = jid_split(jid); 958 local username, host = jid_split(jid);
959 if not hosts[host] then 959 if not hosts[host] then
960 return nil, "No such host: "..host; 960 return nil, "No such host: "..host;
961 elseif um.user_exists(username, host) then 961 elseif not um.user_exists(username, host) then
962 return nil, "No such user"; 962 return nil, "No such user";
963 end 963 end
964 local ok, err = um.delete_user(username, host); 964 local ok, err = um.delete_user(username, host);
965 if ok then 965 if ok then
966 return true, "User deleted"; 966 return true, "User deleted";