Software /
code /
prosody
Changeset
6270:ee2d5b2a263d
mod_admin_telnet: Update muc:room(jid) and muc:list(host) to use the new MUC API
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Thu, 05 Jun 2014 17:15:04 -0400 |
parents | 6269:f89d2dec2977 |
children | 6271:006b0e0f0de2 |
files | plugins/mod_admin_telnet.lua |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_admin_telnet.lua Sun Jun 01 15:40:04 2014 -0400 +++ b/plugins/mod_admin_telnet.lua Thu Jun 05 17:15:04 2014 -0400 @@ -957,7 +957,7 @@ if not room_name then return room_name, host; end - local room_obj = hosts[host].modules.muc.rooms[room_jid]; + local room_obj = hosts[host].modules.muc.get_room_from_jid(room_jid); if not room_obj then return nil, "No such room: "..room_jid; end @@ -970,8 +970,8 @@ return nil, "Please supply the address of a local MUC component"; end local c = 0; - for name in keys(host_session.modules.muc.rooms) do - print(name); + for room in host_session.modules.muc.each_room() do + print(room.jid); c = c + 1; end return true, c.." rooms";