Software /
code /
prosody
Diff
plugins/mod_admin_telnet.lua @ 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 |
parent | 6260:6986ca575568 |
child | 6313:8bd486b6e5ec |
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";