Software /
code /
prosody
Comparison
plugins/mod_admin_telnet.lua @ 5645:ae079d57af2e
Merge 0.9->trunk
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 05 Jun 2013 21:36:29 +0100 |
parent | 5631:78bc91f0d74b |
parent | 5643:e612e1887e39 |
child | 5662:685d46ec352b |
comparison
equal
deleted
inserted
replaced
5641:92ffddd02c96 | 5645:ae079d57af2e |
---|---|
974 | 974 |
975 function def_env.user:delete(jid) | 975 function def_env.user:delete(jid) |
976 local username, host = jid_split(jid); | 976 local username, host = jid_split(jid); |
977 if not hosts[host] then | 977 if not hosts[host] then |
978 return nil, "No such host: "..host; | 978 return nil, "No such host: "..host; |
979 elseif um.user_exists(username, host) then | 979 elseif not um.user_exists(username, host) then |
980 return nil, "No such user"; | 980 return nil, "No such user"; |
981 end | 981 end |
982 local ok, err = um.delete_user(username, host); | 982 local ok, err = um.delete_user(username, host); |
983 if ok then | 983 if ok then |
984 return true, "User deleted"; | 984 return true, "User deleted"; |